interface.d.ts
1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import * as React from 'react';
export declare type SelectSource = 'option' | 'selection' | 'input' | 'clear';
export declare type Key = string | number;
export declare type RawValueType = string | number;
export interface LabelValueType {
key?: Key;
value?: RawValueType;
label?: React.ReactNode;
/** Only works on `treeCheckStrictly` */
halfChecked?: boolean;
}
export declare type DefaultValueType = RawValueType | RawValueType[] | LabelValueType | LabelValueType[];
export interface DataNode {
value?: RawValueType;
title?: React.ReactNode;
label?: React.ReactNode;
key?: Key;
disabled?: boolean;
disableCheckbox?: boolean;
checkable?: boolean;
children?: DataNode[];
/** Customize data info */
[prop: string]: any;
}
export interface InnerDataNode extends DataNode {
key: Key;
value: RawValueType;
label?: React.ReactNode;
children?: InnerDataNode[];
}
export interface LegacyDataNode extends DataNode {
props: any;
}
export interface TreeDataNode extends DataNode {
key: Key;
children?: TreeDataNode[];
}
export interface FlattenDataNode {
data: DataNode;
key: Key;
level: number;
}
export interface SimpleModeConfig {
id?: Key;
pId?: Key;
rootPId?: Key;
}
/** @deprecated This is only used for legacy compatible. Not works on new code. */
export interface LegacyCheckedNode {
pos: string;
node: React.ReactElement;
children?: LegacyCheckedNode[];
}
export interface ChangeEventExtra {
/** @deprecated Please save prev value by control logic instead */
preValue: LabelValueType[];
triggerValue: RawValueType;
/** @deprecated Use `onSelect` or `onDeselect` instead. */
selected?: boolean;
/** @deprecated Use `onSelect` or `onDeselect` instead. */
checked?: boolean;
/** @deprecated This prop not work as react node anymore. */
triggerNode: React.ReactElement;
/** @deprecated This prop not work as react node anymore. */
allCheckedNodes: LegacyCheckedNode[];
}