mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
fix: TS definition for Tree (#28262)
This commit is contained in:
parent
03909941b8
commit
3562c7aaca
@ -126,7 +126,7 @@ export interface TreeProps extends Omit<RcTreeProps, 'prefixCls' | 'showLine' |
|
||||
filterAntTreeNode?: (node: AntTreeNode) => boolean;
|
||||
loadedKeys?: Key[];
|
||||
/** 设置节点可拖拽(IE>8) */
|
||||
draggable?: boolean;
|
||||
draggable?: ((node: DataNode) => boolean) | boolean;
|
||||
style?: React.CSSProperties;
|
||||
showIcon?: boolean;
|
||||
icon?: ((nodeProps: AntdTreeNodeAttribute) => React.ReactNode) | React.ReactNode;
|
||||
|
@ -29,7 +29,7 @@ Almost anything can be represented in a tree structure. Examples include directo
|
||||
| defaultExpandParent | If auto expand parent treeNodes when init | boolean | true | |
|
||||
| defaultSelectedKeys | Specifies the keys of the default selected treeNodes | string\[] | \[] | |
|
||||
| disabled | Whether disabled the tree | boolean | false | |
|
||||
| draggable | Specifies whether this Tree is draggable (IE > 8) | boolean | false | |
|
||||
| draggable | Specifies whether this Tree or the node is draggable (IE > 8) | boolean \| ((node: DataNode) => boolean) | false | |
|
||||
| expandedKeys | (Controlled) Specifies the keys of the expanded treeNodes | string\[] | \[] | |
|
||||
| filterTreeNode | Defines a function to filter (highlight) treeNodes. When the function returns `true`, the corresponding treeNode will be highlighted | function(node) | - | |
|
||||
| height | Config virtual scroll height. Will not support horizontal scroll when enable this | number | - | |
|
||||
|
@ -30,7 +30,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/Xh-oWqg9k/Tree.svg
|
||||
| defaultExpandParent | 默认展开父节点 | boolean | true | |
|
||||
| defaultSelectedKeys | 默认选中的树节点 | string\[] | \[] | |
|
||||
| disabled | 将树禁用 | boolean | false | |
|
||||
| draggable | 设置节点可拖拽(IE>8) | boolean | false | |
|
||||
| draggable | 设置节点可拖拽(IE>8) | boolean \| ((node: DataNode) => boolean) | false | |
|
||||
| expandedKeys | (受控)展开指定的树节点 | string\[] | \[] | |
|
||||
| filterTreeNode | 按需筛选树节点(高亮),返回 true | function(node) | - | |
|
||||
| height | 设置虚拟滚动容器高度,设置后内部节点不再支持横向滚动 | number | - | |
|
||||
|
Loading…
Reference in New Issue
Block a user