diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetGraphExplorer.tsx b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetGraphExplorer.tsx index f578ed1623219..804c40b6fc9b2 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetGraphExplorer.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetGraphExplorer.tsx @@ -101,7 +101,9 @@ export const GROUPS_ONLY_SCALE = 0.15; const DEFAULT_SET_HIDE_NODES_MATCH = (_node: AssetNodeForGraphQueryFragment) => true; export const AssetGraphExplorer = (props: Props) => { - const fullAssetGraphData = useFullAssetGraphData(props.fetchOptions); + const {fullAssetGraphData, loading: fullAssetGraphDataLoading} = useFullAssetGraphData( + props.fetchOptions, + ); const [hideNodesMatching, setHideNodesMatching] = useState(() => DEFAULT_SET_HIDE_NODES_MATCH); const { @@ -152,7 +154,7 @@ export const AssetGraphExplorer = (props: Props) => { return ( {() => { - if (graphDataLoading || filteredAssetsLoading) { + if (graphDataLoading || filteredAssetsLoading || fullAssetGraphDataLoading) { return ; } if (!assetGraphData || !allAssetKeys || !fullAssetGraphData) { diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/useAssetGraphData.tsx b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/useAssetGraphData.tsx index fb022ac59af75..9f04afd587172 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/useAssetGraphData.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/useAssetGraphData.tsx @@ -93,7 +93,7 @@ export function useFullAssetGraphData(options: AssetGraphFetchScope) { }); }, [options.loading, queryItems]); - return fullAssetGraphData; + return {fullAssetGraphData, loading: fetchResult.loading || options.loading}; } export type GraphDataState = {