mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 21:19:37 +08:00
Only leave onCheck, remove onSelect from antd API
This commit is contained in:
parent
fb75c3318c
commit
6cfdca61a8
@ -9,15 +9,13 @@
|
||||
````jsx
|
||||
var Tree = antd.Tree;
|
||||
var TreeNode = Tree.TreeNode;
|
||||
|
||||
function handleCheck(info) {
|
||||
console.log('check: ', info);
|
||||
}
|
||||
function handleSelect(info) {
|
||||
console.log('select: ', info);
|
||||
}
|
||||
|
||||
React.render(
|
||||
<Tree defaultExpandAll={true} checkable={true} onCheck={handleCheck} onSelect={handleSelect}>
|
||||
<Tree defaultExpandAll={true} checkable={true} onCheck={handleCheck}>
|
||||
<TreeNode title="parent 1">
|
||||
<TreeNode>leaf</TreeNode>
|
||||
<TreeNode title="parent 1-1">
|
||||
|
@ -22,7 +22,6 @@
|
||||
|defaultCheckedKeys | 默认选中复选框的树节点 | String[] | [] |
|
||||
|defaultSelectedKeys | 默认选中的树节点 | String[] | [] |
|
||||
|onCheck | 点击树节点或复选框触发 | function(e:{checked:bool,node,checkedKeys,event}) | - |
|
||||
|onSelect | 点击树节点触发 | function(e:{selected:bool,node,checkedKeys,event}) | - |
|
||||
|
||||
### TreeNode props
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user