@@ -6,7 +6,10 @@ import React from 'react';
66import { NavigationTree } from 'ydb-ui-components' ;
77
88import { getConnectToDBDialog } from '../../../../components/ConnectToDB/ConnectToDBDialog' ;
9- import { useCreateDirectoryFeatureAvailable } from '../../../../store/reducers/capabilities/hooks' ;
9+ import {
10+ useCreateDirectoryFeatureAvailable ,
11+ useTopicDataAvailable ,
12+ } from '../../../../store/reducers/capabilities/hooks' ;
1013import { selectIsDirty , selectUserInput } from '../../../../store/reducers/query/query' ;
1114import { schemaApi } from '../../../../store/reducers/schema/schema' ;
1215import { tableSchemaDataApi } from '../../../../store/reducers/tableSchemaData' ;
@@ -44,6 +47,8 @@ export function SchemaTree(props: SchemaTreeProps) {
4447 { currentData : actionsSchemaData , isFetching : isActionsDataFetching } ,
4548 ] = tableSchemaDataApi . useLazyGetTableSchemaDataQuery ( ) ;
4649
50+ const isTopicPreviewAvailable = useTopicDataAvailable ( ) ;
51+
4752 const [ createDirectoryOpen , setCreateDirectoryOpen ] = React . useState ( false ) ;
4853 const [ parentPath , setParentPath ] = React . useState ( '' ) ;
4954 const setSchemaTreeKey = useDispatchTreeKey ( ) ;
@@ -171,9 +176,14 @@ export function SchemaTree(props: SchemaTreeProps) {
171176
172177 return [ ] ;
173178 } }
174- renderAdditionalNodeElements = { getSchemaControls ( dispatch , {
175- setActivePath : onActivePathUpdate ,
176- } ) }
179+ renderAdditionalNodeElements = { getSchemaControls (
180+ dispatch ,
181+ {
182+ setActivePath : onActivePathUpdate ,
183+ } ,
184+ undefined ,
185+ isTopicPreviewAvailable ,
186+ ) }
177187 activePath = { currentPath }
178188 onActivePathUpdate = { onActivePathUpdate }
179189 cache = { false }
0 commit comments