ali-react-table icon indicating copy to clipboard operation
ali-react-table copied to clipboard

【树形选择】在存在禁用项的时候,全选的时候,会把禁用项也给勾选

Open cccRaim opened this issue 3 years ago • 0 comments

问题表现

直接编辑文档里,进行复现 https://ali-react-table.js.org/docs/pipeline/features/tree-select/

复现代码

function 树形可选择表格() {
  const dataSource = assets.biz.dataSource4
  const columns = assets.biz.columns4

  const pipeline = useTablePipeline({ components: fusion })
    .input({ dataSource, columns })
    .primaryKey('id')
    .use(features.treeMode())
    .use(
      features.treeSelect({
        tree: dataSource,
        rootKey: 'root',
        checkboxPlacement: 'start',
        clickArea: 'cell',
        defaultValue: ['1', '3'],
        checkboxColumn: { lock: true },
        highlightRowWhenSelected: true,
        isDisabled: (row) => row.id === '2',
        onChange: (...args) => console.log(...args)
      }),
    )

  return <BaseTable {...pipeline.getProps()} />
}

期望表现

全选的时候不应该勾选禁用项

cccRaim avatar Mar 09 '22 12:03 cccRaim