tdesign-react
Version:
TDesign Component for React
15 lines (14 loc) • 753 B
TypeScript
import { ElementRef, MutableRefObject } from 'react';
import type { TreeSelectValue } from '../type';
import Tree, { TreeNodeValue } from '../../tree';
import type { TreeSelectProps } from '../TreeSelect';
export declare const useTreeSelectUtils: ({ data, treeProps, valueType }: TreeSelectProps, treeRef: MutableRefObject<ElementRef<typeof Tree>>) => {
getNodeItem: (value: string | number) => import("@tdesign/common-js/tree-v1/types").TypeTreeNodeModel | import("../../tree").TreeNodeModel<import("../../common").TreeOptionData>;
formatValue: (value: TreeNodeValue | null, label?: any) => string | number | {
[x: string]: any;
};
normalizeValue: (value: TreeSelectValue) => {
value: any;
label: any;
};
};