diff --git a/components/tree/demo/draggable.md b/components/tree/demo/draggable.md index 2a56b6a5e0..b295ec09ab 100644 --- a/components/tree/demo/draggable.md +++ b/components/tree/demo/draggable.md @@ -46,9 +46,11 @@ const Demo = React.createClass({ }; }, onDragEnter(info) { - this.setState({ - expandedKeys: info.expandedKeys, - }); + console.log(info); + // expandedKeys 需要受控时设置 + // this.setState({ + // expandedKeys: info.expandedKeys, + // }); }, onDrop(info) { console.log(info); @@ -88,7 +90,6 @@ const Demo = React.createClass({ } this.setState({ gData: data, - expandedKeys: info.originExpandedKeys, }); }, render() { diff --git a/components/tree/index.md b/components/tree/index.md index 80cc933894..33e1939b56 100644 --- a/components/tree/index.md +++ b/components/tree/index.md @@ -26,8 +26,8 @@ |selectedKeys | (受控)设置选中的树节点 | String[] | - | |defaultSelectedKeys | 默认选中的树节点 | String[] | [] | |onExpand | 展开/收起节点时触发 | function(node, expanded, expandedKeys) | - | -|onCheck | 点击复选框触发 | function(e:{checked:bool, node, checkedKeys, event}) | - | -|onSelect | 点击树节点触发 | function(e:{selected:bool,node,selectedKeys,event}) | - | +|onCheck | 点击复选框触发 | function(checkedKeys, e:{checked: bool, checkedNodes, node, event}) | - | +|onSelect | 点击树节点触发 | function(selectedKeys, e:{selected: bool, selectedNodes, node, event}) | - | |filterTreeNode | filter some treeNodes as you need. it should return true | function(node) | - | |loadData | 异步加载数据 | function(node)| - | |onRightClick | 响应右键点击 | function({event,node}) | - | diff --git a/package.json b/package.json index 6d8247cc8a..c1a5458423 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "rc-tabs": "~5.7.0", "rc-time-picker": "~1.1.0", "rc-tooltip": "~3.3.1", - "rc-tree": "~1.0.2", + "rc-tree": "~1.1.0", "rc-tree-select": "~1.0.1", "rc-trigger": "~1.1.1", "rc-upload": "~1.8.0",