Skip to content

Conversation

jaredleechn
Copy link
Member

onExpandedRowsChange(currentExpandRowKeys, preExpandRowKeys) {}

@yiminghe
Copy link
Member

为什么这个特殊加这个,其他所有组件的 onChange 都不会有 pre 的信息的

@afc163
Copy link
Member

afc163 commented Jan 21, 2016

@jaredleechn 原本想要的其实是 onExpandIconClick

其实原来的 onExpandedRowsChange(currentExpandRowKeys) {} 也能满足需求。

保存 expandedRowKeys 到父组件的 this.state.expandedRowKeys,做成受控模式。然后比较 expandedRowKeysthis.state.expandedRowKeys 就可以了,不需要 preExpandRowKeys

@jaredleechn
Copy link
Member Author

ok,能满足的话,先关掉

不过感觉 change 事件还是应该带一个能描述变化的参数,额外管理有点麻烦

@benjycui
Copy link
Member

不需要的 branch delete 掉?

@jaredleechn jaredleechn deleted the addPreExpandRows branch January 22, 2016 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants