@@ -6,15 +6,14 @@ import Tree from 'mo/components/tree';
66import { IMenuItemProps , Menu } from 'mo/components/menu' ;
77import { Button } from 'mo/components/button' ;
88import type { IFolderTreeController } from 'mo/controller/explorer/folderTree' ;
9- import { useContextView } from 'mo/components/contextView' ;
109import { useContextMenu } from 'mo/components/contextMenu' ;
1110import {
1211 folderTreeClassName ,
1312 folderTreeEditClassName ,
1413 folderTreeInputClassName ,
1514} from './base' ;
1615import { classNames } from 'mo/common/className' ;
17- import { Scrollable } from 'mo/components' ;
16+ import { Scrollable , useContextViewEle } from 'mo/components' ;
1817import { ICollapseItem } from 'mo/components/collapse' ;
1918
2019export interface IFolderTreeProps extends IFolderTreeController , IFolderTree {
@@ -95,7 +94,7 @@ const FolderTree: React.FunctionComponent<IFolderTreeProps> = (props) => {
9594 const contextMenu = useRef < ReturnType < typeof useContextMenu > > ( ) ;
9695
9796 // panel context view
98- const contextView = useContextView ( ) ;
97+ const contextView = useContextViewEle ( ) ;
9998
10099 // to detect current tree whether is editable
101100 const hasEditable = detectHasEditableStatus ( data ) ;
@@ -124,7 +123,7 @@ const FolderTree: React.FunctionComponent<IFolderTreeProps> = (props) => {
124123 data : IFolderTreeNodeProps
125124 ) => {
126125 onClickContextMenu ?.( item , data ) ;
127- contextView . hide ( ) ;
126+ contextView ? .hide ( ) ;
128127 } ;
129128
130129 const handleRightClick = ( event , data ) => {
0 commit comments