diff --git a/pkg/interface/src/logic/reducers/metadata-update.ts b/pkg/interface/src/logic/reducers/metadata-update.ts index 5cf6671af..92b559bab 100644 --- a/pkg/interface/src/logic/reducers/metadata-update.ts +++ b/pkg/interface/src/logic/reducers/metadata-update.ts @@ -30,6 +30,7 @@ const associations = (json: MetadataUpdate, state: MetadataState): MetadataState }); state.associations = metadata; + state.loaded = true; } return state; }; diff --git a/pkg/interface/src/logic/state/metadata.ts b/pkg/interface/src/logic/state/metadata.ts index 096c2a791..d1a3795c9 100644 --- a/pkg/interface/src/logic/state/metadata.ts +++ b/pkg/interface/src/logic/state/metadata.ts @@ -13,6 +13,7 @@ export const METADATA_MAX_PREVIEW_WAIT = 150000; export interface MetadataState { associations: Associations; + loaded: boolean; getPreview: (group: string) => Promise; previews: { @@ -24,6 +25,7 @@ export interface MetadataState { const useMetadataState = createState( 'Metadata', (set, get) => ({ + loaded: false, associations: { groups: {}, graph: {} @@ -53,7 +55,7 @@ const useMetadataState = createState( } } }), - [], + ['loaded'], [ (set, get) => createSubscription('metadata-store', '/all', (j) => {