TreeNode.d.ts
2.96 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import * as React from 'react';
import { TreeContextProps } from './contextTypes';
import { IconType, Key, DataNode } from './interface';
export interface TreeNodeProps {
eventKey?: Key;
prefixCls?: string;
className?: string;
style?: React.CSSProperties;
expanded?: boolean;
selected?: boolean;
checked?: boolean;
loaded?: boolean;
loading?: boolean;
halfChecked?: boolean;
title?: React.ReactNode | ((data: DataNode) => React.ReactNode);
dragOver?: boolean;
dragOverGapTop?: boolean;
dragOverGapBottom?: boolean;
pos?: string;
domRef?: React.Ref<HTMLDivElement>;
/** New added in Tree for easy data access */
data?: DataNode;
isStart?: boolean[];
isEnd?: boolean[];
active?: boolean;
onMouseMove?: React.MouseEventHandler<HTMLDivElement>;
isLeaf?: boolean;
checkable?: boolean;
selectable?: boolean;
disabled?: boolean;
disableCheckbox?: boolean;
icon?: IconType;
switcherIcon?: IconType;
children?: React.ReactNode;
}
export interface InternalTreeNodeProps extends TreeNodeProps {
context?: TreeContextProps;
}
export interface TreeNodeState {
dragNodeHighlight: boolean;
}
declare class InternalTreeNode extends React.Component<InternalTreeNodeProps, TreeNodeState> {
state: {
dragNodeHighlight: boolean;
};
selectHandle: HTMLSpanElement;
componentDidMount(): void;
componentDidUpdate(): void;
onSelectorClick: (e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => void;
onSelectorDoubleClick: (e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => void;
onSelect: (e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => void;
onCheck: (e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => void;
onMouseEnter: (e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => void;
onMouseLeave: (e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => void;
onContextMenu: (e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => void;
onDragStart: (e: React.DragEvent<HTMLDivElement>) => void;
onDragEnter: (e: React.DragEvent<HTMLDivElement>) => void;
onDragOver: (e: React.DragEvent<HTMLDivElement>) => void;
onDragLeave: (e: React.DragEvent<HTMLDivElement>) => void;
onDragEnd: (e: React.DragEvent<HTMLDivElement>) => void;
onDrop: (e: React.DragEvent<HTMLDivElement>) => void;
onExpand: React.MouseEventHandler<HTMLDivElement>;
setSelectHandle: (node: any) => void;
getNodeState: () => "open" | "close";
hasChildren: () => boolean;
isLeaf: () => boolean;
isDisabled: () => boolean;
isCheckable: () => {};
syncLoadData: (props: any) => void;
isSelectable(): boolean;
renderSwitcher: () => JSX.Element;
renderCheckbox: () => JSX.Element;
renderIcon: () => JSX.Element;
renderSelector: () => JSX.Element;
renderDropIndicator: () => {};
render(): JSX.Element;
}
declare const ContextTreeNode: React.FC<TreeNodeProps>;
export { InternalTreeNode };
export default ContextTreeNode;