@@ -6,13 +6,19 @@ import React from 'react';
66import { NavigationTree } from 'ydb-ui-components' ;
77
88import { useCreateDirectoryFeatureAvailable } from '../../../../store/reducers/capabilities/hooks' ;
9+ import { selectUserInput } from '../../../../store/reducers/executeQuery' ;
910import { schemaApi } from '../../../../store/reducers/schema/schema' ;
1011import { tableSchemaDataApi } from '../../../../store/reducers/tableSchemaData' ;
1112import type { GetTableSchemaDataParams } from '../../../../store/reducers/tableSchemaData' ;
1213import type { EPathType , TEvDescribeSchemeResult } from '../../../../types/api/schema' ;
1314import { wait } from '../../../../utils' ;
1415import { SECOND_IN_MS } from '../../../../utils/constants' ;
15- import { useQueryExecutionSettings , useTypedDispatch } from '../../../../utils/hooks' ;
16+ import {
17+ useQueryExecutionSettings ,
18+ useTypedDispatch ,
19+ useTypedSelector ,
20+ } from '../../../../utils/hooks' ;
21+ import { getConfirmation } from '../../../../utils/hooks/withConfirmation/useChangeInputWithConfirmation' ;
1622import { getSchemaControls } from '../../utils/controls' ;
1723import { isChildlessPathType , mapPathTypeToNavigationTreeType } from '../../utils/schema' ;
1824import { getActions } from '../../utils/schemaActions' ;
@@ -33,6 +39,7 @@ export function SchemaTree(props: SchemaTreeProps) {
3339 const createDirectoryFeatureAvailable = useCreateDirectoryFeatureAvailable ( ) ;
3440 const { rootPath, rootName, rootType, currentPath, onActivePathUpdate} = props ;
3541 const dispatch = useTypedDispatch ( ) ;
42+ const input = useTypedSelector ( selectUserInput ) ;
3643 const [ getTableSchemaDataMutation ] = tableSchemaDataApi . useGetTableSchemaDataMutation ( ) ;
3744
3845 const getTableSchemaDataPromise = React . useCallback (
@@ -144,6 +151,7 @@ export function SchemaTree(props: SchemaTreeProps) {
144151 ? handleOpenCreateDirectoryDialog
145152 : undefined ,
146153 getTableSchemaDataPromise,
154+ getConfirmation : input ? getConfirmation : undefined ,
147155 } ,
148156 rootPath ,
149157 ) }
0 commit comments