mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
fix: prevent flicker by setting data before mount
This commit is contained in:
parent
4581d1d089
commit
ab6cc88fdd
@ -233,6 +233,9 @@ export default defineComponent({
|
||||
row: null | { index: number; fieldname: string };
|
||||
};
|
||||
},
|
||||
async beforeMount() {
|
||||
this.useFullWidth = !!this.fyo.singles.Misc?.useFullWidth;
|
||||
},
|
||||
async mounted() {
|
||||
if (this.fyo.store.isDevelopment) {
|
||||
// @ts-ignore
|
||||
@ -242,13 +245,13 @@ export default defineComponent({
|
||||
await this.setDoc();
|
||||
this.replacePathAfterSync();
|
||||
this.updateGroupedFields();
|
||||
this.useFullWidth = !!this.fyo.singles.Misc?.useFullWidth;
|
||||
if (this.groupedFields) {
|
||||
this.activeTab = [...this.groupedFields.keys()][0];
|
||||
}
|
||||
this.isPrintable = await isPrintable(this.schemaName);
|
||||
},
|
||||
activated(): void {
|
||||
this.useFullWidth = !!this.fyo.singles.Misc?.useFullWidth;
|
||||
docsPathRef.value = docsPathMap[this.schemaName] ?? '';
|
||||
this.shortcuts?.pmod.set(this.context, ['KeyP'], () => {
|
||||
if (!this.canPrint) {
|
||||
|
Loading…
Reference in New Issue
Block a user