UNPKG

1.28 kBTypeScriptView Raw
1/**
2 * BaseSelect provide some parsed data into context.
3 * You can use this hooks to get them.
4 */
5import type { TreeProps } from '../tree';
6import type { DataEntity, IconType } from '../vc-tree/interface';
7import type { InternalDataEntity, Key, LegacyDataNode, RawValueType } from './interface';
8export interface LegacyContextProps {
9 checkable: boolean;
10 checkedKeys: Key[];
11 customCheckable: () => any;
12 halfCheckedKeys: Key[];
13 treeExpandedKeys: Key[];
14 treeDefaultExpandedKeys: Key[];
15 onTreeExpand: (keys: Key[]) => void;
16 treeDefaultExpandAll: boolean;
17 treeIcon: IconType;
18 showTreeIcon: boolean;
19 switcherIcon: IconType;
20 treeLine: TreeProps['showLine'];
21 treeNodeFilterProp: string;
22 treeLoadedKeys: Key[];
23 treeMotion: any;
24 loadData: (treeNode: LegacyDataNode) => Promise<unknown>;
25 onTreeLoad: (loadedKeys: Key[]) => void;
26 keyEntities: Record<RawValueType, DataEntity<any>>;
27 customSlots: {
28 title?: (data: InternalDataEntity) => any;
29 treeCheckable: () => any;
30 [key: string]: ((...args: any[]) => any) | undefined;
31 };
32}
33export declare function useProvideLegacySelectContext(props: LegacyContextProps): void;
34export default function useInjectLegacySelectContext(): LegacyContextProps;
35
\No newline at end of file