ant-design-vue
ant-design-vue copied to clipboard
Table row-selection父子节点事件和属性优先级问题
- [ ] I have searched the issues of this repository and believe that this is not a duplicate.
Version
4.2.3
Environment
browser
Reproduction link
Steps to reproduce
当table 的row-selection中的checkStrictly属性设置为false,初始selectedRowKeys也有值,初始渲染后的选中应该是selectedRowKeys中的值,因为此时并没有触发手动选择。目前初始渲染后父节点选中了,子节点即使不在选中数组里也会被选中,这个过程中不会触发onChange事件
What is expected?
初始要么选中结果和selectedRowKeys中的一样,我手动修改选中状态的时候再父子节点关联。或者初始在onChange事件中把修改值抛出来。
What is actually happening?
当table 的row-selection中的checkStrictly属性设置为false,初始selectedRowKeys也有值,初始渲染后的选中应该是selectedRowKeys中的值,因为此时并没有触发手动选择。目前初始渲染后父节点选中了,子节点即使不在选中数组里也会被选中,这个过程中不会触发onChange事件
目前解决方案是重写了row-selection里的columnTitle、renderCell里面的逻辑
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days