@@ -6,15 +6,14 @@ import Tree from 'mo/components/tree';
6
6
import { IMenuItemProps , Menu } from 'mo/components/menu' ;
7
7
import { Button } from 'mo/components/button' ;
8
8
import type { IFolderTreeController } from 'mo/controller/explorer/folderTree' ;
9
- import { useContextView } from 'mo/components/contextView' ;
10
9
import { useContextMenu } from 'mo/components/contextMenu' ;
11
10
import {
12
11
folderTreeClassName ,
13
12
folderTreeEditClassName ,
14
13
folderTreeInputClassName ,
15
14
} from './base' ;
16
15
import { classNames } from 'mo/common/className' ;
17
- import { Scrollable } from 'mo/components' ;
16
+ import { Scrollable , useContextViewEle } from 'mo/components' ;
18
17
import { ICollapseItem } from 'mo/components/collapse' ;
19
18
20
19
export interface IFolderTreeProps extends IFolderTreeController , IFolderTree {
@@ -95,7 +94,7 @@ const FolderTree: React.FunctionComponent<IFolderTreeProps> = (props) => {
95
94
const contextMenu = useRef < ReturnType < typeof useContextMenu > > ( ) ;
96
95
97
96
// panel context view
98
- const contextView = useContextView ( ) ;
97
+ const contextView = useContextViewEle ( ) ;
99
98
100
99
// to detect current tree whether is editable
101
100
const hasEditable = detectHasEditableStatus ( data ) ;
@@ -124,7 +123,7 @@ const FolderTree: React.FunctionComponent<IFolderTreeProps> = (props) => {
124
123
data : IFolderTreeNodeProps
125
124
) => {
126
125
onClickContextMenu ?.( item , data ) ;
127
- contextView . hide ( ) ;
126
+ contextView ? .hide ( ) ;
128
127
} ;
129
128
130
129
const handleRightClick = ( event , data ) => {
0 commit comments