diff --git a/packages/gi-sdk/src/Initializer.tsx b/packages/gi-sdk/src/Initializer.tsx index 4fed85873..45fed4790 100644 --- a/packages/gi-sdk/src/Initializer.tsx +++ b/packages/gi-sdk/src/Initializer.tsx @@ -30,6 +30,10 @@ const Initializer: React.FunctionComponent = props => { service: () => Promise.resolve(null), }; + updateContext(draft => { + draft.isLoading = true; + }); + Promise.all([schemaService(), initialService()]).then(([schema, data = { nodes: [], edges: [] }]) => { updateContext(draft => { const { nodes, edges } = data; @@ -39,6 +43,7 @@ const Initializer: React.FunctionComponent = props => { draft.schemaData = schema as any; } + const position = isPosition(nodes); const style = isStyles(nodes); if (position) { @@ -69,6 +74,7 @@ const Initializer: React.FunctionComponent = props => { } draft.initialized = true; draft.layoutCache = false; + draft.isLoading = false; }); }); }, [largeGraphLimit]);