Ant-design-vue: table组件 getCheckboxProps的disabled 可以动态设置么

Created on 21 Aug 2019  ·  5Comments  ·  Source: vueComponent/ant-design-vue

  • [ ] I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

可以动态控制每个tr的可选中状态

What does the proposed API look like?

const rowSelection = {
  getCheckboxProps: (record) => ({
    props: {
      disabled: record['isLocked'],
    }
  })
}

Most helpful comment

onChange中将tableData重新设置即可再次触发

All 5 comments

我也有这个需求,应该是新开一个API接口,比如 setCheckboxProps 这样的。

我也有这个需求,应该是新开一个API接口,比如 setCheckboxProps 这样的。

https://antdv.com/components/table-cn/#components-table-demo-selection 这个没法实现吗

我也有这个需求,应该是新开一个API接口,比如 setCheckboxProps 这样的。

https://antdv.com/components/table-cn/#components-table-demo-selection 这个没法实现吗

我的需求是通过select组件对另外两个table实现联动控制,一开始看文档这个getCheckboxProps这个API 只说是设置默认属性配置,我就认为只是初始设置,不能动态更改,其实是可以的。

通过 https://github.com/vueComponent/ant-design-vue/issues/935 这个。

onChange中将tableData重新设置即可再次触发

onChange中将tableData重新设置即可再次触发

thank u sir!

Was this page helpful?
0 / 5 - 0 ratings