File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ export const useCoreStore = defineStore('core', () => {
1616 const record : Ref < any | null > = ref ( { } ) ;
1717 const resource : Ref < AdminForthResourceCommon | null > = ref ( null ) ;
1818 const userData : Ref < UserData | null > = ref ( null ) ;
19+ const isResourceFetching = ref ( false ) ;
1920
2021 const resourceColumnsWithFilters = computed ( ( ) => {
2122 if ( ! resource . value ) {
@@ -172,6 +173,7 @@ export const useCoreStore = defineStore('core', () => {
172173 // already fetched
173174 return ;
174175 }
176+ isResourceFetching . value = true ;
175177 resourceColumnsId . value = resourceId ;
176178 resourceColumnsError . value = '' ;
177179 const res = await callAdminForthApi ( {
@@ -188,6 +190,7 @@ export const useCoreStore = defineStore('core', () => {
188190 resource . value = res . resource ;
189191 resourceOptions . value = res . resource . options ;
190192 }
193+ isResourceFetching . value = false ;
191194 }
192195
193196 async function getPublicConfig ( ) {
@@ -239,5 +242,6 @@ export const useCoreStore = defineStore('core', () => {
239242 fetchMenuBadges,
240243 resetAdminUser,
241244 resetResource,
245+ isResourceFetching,
242246 }
243247} )
Original file line number Diff line number Diff line change 1010 </Teleport >
1111
1212 <component
13+ v-if =" !coreStore.isResourceFetching"
1314 v-for =" c in coreStore?.resourceOptions?.pageInjections?.list?.beforeBreadcrumbs || []"
1415 :is =" getCustomComponent(c)"
1516 :meta =" (c as AdminForthComponentDeclarationFull).meta"
1920
2021 <BreadcrumbsWithButtons >
2122 <component
23+ v-if =" !coreStore.isResourceFetching"
2224 v-for =" c in coreStore?.resourceOptions?.pageInjections?.list?.beforeActionButtons || []"
2325 :is =" getCustomComponent(c)"
2426 :meta =" (c as AdminForthComponentDeclarationFull).meta"
98100 </button >
99101
100102 <ThreeDotsMenu
103+ v-if =" !coreStore.isResourceFetching"
101104 :threeDotsDropdownItems =" (coreStore.resourceOptions?.pageInjections?.list?.threeDotsDropdownItems as [])"
102105 :bulkActions =" coreStore.resource?.options?.bulkActions"
103106 :checkboxes =" checkboxes"
108111 </BreadcrumbsWithButtons >
109112
110113 <component
114+ v-if =" !coreStore.isResourceFetching"
111115 v-for =" c in coreStore?.resourceOptions?.pageInjections?.list?.afterBreadcrumbs || []"
112116 :is =" getCustomComponent(c)"
113117 :meta =" (c as AdminForthComponentDeclarationFull).meta"
You can’t perform that action at this time.
0 commit comments