2017-11-17 14:38:54 +08:00
|
|
|
import * as React from 'react';
|
2017-03-28 15:10:07 +08:00
|
|
|
import { AbstractSelectProps } from '../select';
|
2016-08-01 16:35:01 +08:00
|
|
|
|
2016-09-13 15:31:29 +08:00
|
|
|
export interface TreeData {
|
2016-08-01 16:35:01 +08:00
|
|
|
key: string;
|
|
|
|
value: string;
|
|
|
|
label: React.ReactNode;
|
2017-03-28 15:10:07 +08:00
|
|
|
children?: TreeData[];
|
2016-08-01 16:35:01 +08:00
|
|
|
}
|
|
|
|
|
2017-03-28 15:10:07 +08:00
|
|
|
export interface TreeSelectProps extends AbstractSelectProps {
|
2016-08-01 16:35:01 +08:00
|
|
|
value?: string | Array<any>;
|
|
|
|
defaultValue?: string | Array<any>;
|
|
|
|
multiple?: boolean;
|
|
|
|
onSelect?: (value: any) => void;
|
|
|
|
onChange?: (value: any, label: any) => void;
|
|
|
|
onSearch?: (value: any) => void;
|
|
|
|
searchPlaceholder?: string;
|
|
|
|
dropdownStyle?: React.CSSProperties;
|
|
|
|
dropdownMatchSelectWidth?: boolean;
|
|
|
|
treeDefaultExpandAll?: boolean;
|
|
|
|
treeCheckable?: boolean | React.ReactNode;
|
2017-03-28 13:45:10 +08:00
|
|
|
treeDefaultExpandedKeys?: Array<string>;
|
2016-09-19 10:17:07 +08:00
|
|
|
filterTreeNode?: (inputValue: string, treeNode: any) => boolean | boolean;
|
2016-08-01 16:35:01 +08:00
|
|
|
treeNodeFilterProp?: string;
|
|
|
|
treeNodeLabelProp?: string;
|
|
|
|
treeData?: Array<TreeData>;
|
2016-09-19 10:17:07 +08:00
|
|
|
treeDataSimpleMode?: boolean | Object;
|
2016-08-01 16:35:01 +08:00
|
|
|
loadData?: (node: any) => void;
|
|
|
|
showCheckedStrategy?: 'SHOW_ALL' | 'SHOW_PARENT' | 'SHOW_CHILD';
|
2016-09-19 10:17:07 +08:00
|
|
|
labelInValue?: boolean;
|
|
|
|
treeCheckStrictly?: boolean;
|
2017-03-28 13:20:05 +08:00
|
|
|
getPopupContainer?: (triggerNode: Element) => HTMLElement;
|
2016-08-01 16:35:01 +08:00
|
|
|
}
|