@@ -6,13 +6,19 @@ import React from 'react';
6
6
import { NavigationTree } from 'ydb-ui-components' ;
7
7
8
8
import { useCreateDirectoryFeatureAvailable } from '../../../../store/reducers/capabilities/hooks' ;
9
+ import { selectUserInput } from '../../../../store/reducers/executeQuery' ;
9
10
import { schemaApi } from '../../../../store/reducers/schema/schema' ;
10
11
import { tableSchemaDataApi } from '../../../../store/reducers/tableSchemaData' ;
11
12
import type { GetTableSchemaDataParams } from '../../../../store/reducers/tableSchemaData' ;
12
13
import type { EPathType , TEvDescribeSchemeResult } from '../../../../types/api/schema' ;
13
14
import { wait } from '../../../../utils' ;
14
15
import { 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' ;
16
22
import { getSchemaControls } from '../../utils/controls' ;
17
23
import { isChildlessPathType , mapPathTypeToNavigationTreeType } from '../../utils/schema' ;
18
24
import { getActions } from '../../utils/schemaActions' ;
@@ -33,6 +39,7 @@ export function SchemaTree(props: SchemaTreeProps) {
33
39
const createDirectoryFeatureAvailable = useCreateDirectoryFeatureAvailable ( ) ;
34
40
const { rootPath, rootName, rootType, currentPath, onActivePathUpdate} = props ;
35
41
const dispatch = useTypedDispatch ( ) ;
42
+ const input = useTypedSelector ( selectUserInput ) ;
36
43
const [ getTableSchemaDataMutation ] = tableSchemaDataApi . useGetTableSchemaDataMutation ( ) ;
37
44
38
45
const getTableSchemaDataPromise = React . useCallback (
@@ -144,6 +151,7 @@ export function SchemaTree(props: SchemaTreeProps) {
144
151
? handleOpenCreateDirectoryDialog
145
152
: undefined ,
146
153
getTableSchemaDataPromise,
154
+ getConfirmation : input ? getConfirmation : undefined ,
147
155
} ,
148
156
rootPath ,
149
157
) }
0 commit comments