mirror of
https://github.com/frappe/books.git
synced 2025-02-08 23:18:31 +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 };
|
row: null | { index: number; fieldname: string };
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
async beforeMount() {
|
||||||
|
this.useFullWidth = !!this.fyo.singles.Misc?.useFullWidth;
|
||||||
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
if (this.fyo.store.isDevelopment) {
|
if (this.fyo.store.isDevelopment) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
@ -242,13 +245,13 @@ export default defineComponent({
|
|||||||
await this.setDoc();
|
await this.setDoc();
|
||||||
this.replacePathAfterSync();
|
this.replacePathAfterSync();
|
||||||
this.updateGroupedFields();
|
this.updateGroupedFields();
|
||||||
this.useFullWidth = !!this.fyo.singles.Misc?.useFullWidth;
|
|
||||||
if (this.groupedFields) {
|
if (this.groupedFields) {
|
||||||
this.activeTab = [...this.groupedFields.keys()][0];
|
this.activeTab = [...this.groupedFields.keys()][0];
|
||||||
}
|
}
|
||||||
this.isPrintable = await isPrintable(this.schemaName);
|
this.isPrintable = await isPrintable(this.schemaName);
|
||||||
},
|
},
|
||||||
activated(): void {
|
activated(): void {
|
||||||
|
this.useFullWidth = !!this.fyo.singles.Misc?.useFullWidth;
|
||||||
docsPathRef.value = docsPathMap[this.schemaName] ?? '';
|
docsPathRef.value = docsPathMap[this.schemaName] ?? '';
|
||||||
this.shortcuts?.pmod.set(this.context, ['KeyP'], () => {
|
this.shortcuts?.pmod.set(this.context, ['KeyP'], () => {
|
||||||
if (!this.canPrint) {
|
if (!this.canPrint) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user