1 | import * as React from 'react';
|
2 | import RcTreeSelect, { TreeNode, SHOW_ALL, SHOW_PARENT, SHOW_CHILD, TreeSelectProps as RcTreeSelectProps } from 'rc-tree-select';
|
3 | import { ConfigConsumerProps } from '../config-provider';
|
4 | import { SizeType } from '../config-provider/SizeContext';
|
5 | declare type RawValue = string | number;
|
6 | export interface LabeledValue {
|
7 | key?: string;
|
8 | value: RawValue;
|
9 | label: React.ReactNode;
|
10 | }
|
11 | export declare type SelectValue = RawValue | RawValue[] | LabeledValue | LabeledValue[];
|
12 | export interface TreeSelectProps<T> extends Omit<RcTreeSelectProps<T>, 'showTreeIcon' | 'treeMotion' | 'inputIcon' | 'mode' | 'getInputElement' | 'backfill'> {
|
13 | suffixIcon?: React.ReactNode;
|
14 | size?: SizeType;
|
15 | bordered?: boolean;
|
16 | }
|
17 | declare class TreeSelect<T> extends React.Component<TreeSelectProps<T>, {}> {
|
18 | static TreeNode: React.FC<import("rc-tree-select/lib/TreeNode").TreeNodeProps>;
|
19 | static SHOW_ALL: typeof SHOW_ALL;
|
20 | static SHOW_PARENT: typeof SHOW_PARENT;
|
21 | static SHOW_CHILD: typeof SHOW_CHILD;
|
22 | static defaultProps: {
|
23 | transitionName: string;
|
24 | choiceTransitionName: string;
|
25 | bordered: boolean;
|
26 | };
|
27 | selectRef: React.RefObject<RcTreeSelect<import("rc-tree-select/lib/interface").DefaultValueType>>;
|
28 | constructor(props: TreeSelectProps<T>);
|
29 | focus(): void;
|
30 | blur(): void;
|
31 | renderTreeSelect: ({ getPopupContainer: getContextPopupContainer, getPrefixCls, renderEmpty, direction, virtual, dropdownMatchSelectWidth, }: ConfigConsumerProps) => JSX.Element;
|
32 | render(): JSX.Element;
|
33 | }
|
34 | export { TreeNode };
|
35 | export default TreeSelect;
|