12
common/resources/client/ui/tree/tree-context.tsx
Executable file
12
common/resources/client/ui/tree/tree-context.tsx
Executable file
@@ -0,0 +1,12 @@
|
||||
import {createContext, Key} from 'react';
|
||||
|
||||
export interface TreeContextValue {
|
||||
expandedKeys: Key[];
|
||||
setExpandedKeys: (value: Key[]) => void;
|
||||
selectedKeys: Key[];
|
||||
setSelectedKeys: (value: Key[]) => void;
|
||||
focusedNode?: Key;
|
||||
setFocusedNode: (node?: Key) => void;
|
||||
}
|
||||
|
||||
export const TreeContext = createContext<TreeContextValue>(null!);
|
||||
Reference in New Issue
Block a user