@@ -8,10 +8,11 @@ import {LoaderWrapper} from '../../components/LoaderWrapper/LoaderWrapper';
8
8
import SplitPane from '../../components/SplitPane' ;
9
9
import { setHeaderBreadcrumbs } from '../../store/reducers/header/header' ;
10
10
import { overviewApi } from '../../store/reducers/overview/overview' ;
11
+ import { selectSchemaObjectData } from '../../store/reducers/schema/schema' ;
11
12
import type { AdditionalNodesProps , AdditionalTenantsProps } from '../../types/additionalProps' ;
12
13
import { cn } from '../../utils/cn' ;
13
14
import { DEFAULT_IS_TENANT_SUMMARY_COLLAPSED , DEFAULT_SIZE_TENANT_KEY } from '../../utils/constants' ;
14
- import { useAutoRefreshInterval , useTypedDispatch } from '../../utils/hooks' ;
15
+ import { useAutoRefreshInterval , useTypedDispatch , useTypedSelector } from '../../utils/hooks' ;
15
16
import { isAccessError } from '../../utils/response' ;
16
17
17
18
import ObjectGeneral from './ObjectGeneral/ObjectGeneral' ;
@@ -100,8 +101,18 @@ export function Tenant(props: TenantProps) {
100
101
pollingInterval : autoRefreshInterval ,
101
102
} ,
102
103
) ;
103
- const { PathType : currentPathType , PathSubType : currentPathSubType } =
104
- currentItem ?. PathDescription ?. Self || { } ;
104
+
105
+ const preloadedData = useTypedSelector ( ( state ) =>
106
+ selectSchemaObjectData ( state , path , tenantName ) ,
107
+ ) ;
108
+
109
+ // Use preloaded data if there is no current item data yet
110
+ const currentPathType =
111
+ currentItem ?. PathDescription ?. Self ?. PathType ??
112
+ preloadedData ?. PathDescription ?. Self ?. PathType ;
113
+ const currentPathSubType =
114
+ currentItem ?. PathDescription ?. Self ?. PathSubType ??
115
+ preloadedData ?. PathDescription ?. Self ?. PathSubType ;
105
116
106
117
const showBlockingError = isAccessError ( error ) ;
107
118
0 commit comments