Antd form checkbox Select all

clipboard.png
as shown in the figure, the first time to render the data is to click the left radio button to set the default value of the right multi-box chechbox according to the value returned by the background
. The operation behind is to click the all-select button on the right, and to view and edit the following multi-check boxes correspond to linkage. This is a tree structure list.
I think only the columns above the antd are all selected. There are no rows to select all, and my checkbox is a row of render
what to do with this

const columnsMenu = [
      {
        title: "",
        key: "NAME",
        dataIndex: "NAME",
      },
      {
        title: "",
        key: "AUTHORITY_ALL",
        dataIndex: "AUTHORITY_ALL",
        render: (text, record) => (<Checkbox onChange={this.handleCheckbox} checked={record.AUTHORITY_ALL} value={record.ID} />),
      },
      {
        title: "",
        key: "AUTHORITY_CHECK",
        dataIndex: "AUTHORITY_CHECK",
        render: (text, record) => (<Checkbox onChange={this.handleCheckbox} checked={record.AUTHORITY_CHECK} value={record.ID} />),
      },
      {
        title: "",
        key: "AUTHORITY_EDIT",
        dataIndex: "AUTHORITY_EDIT",
        render: (text, record) => (<Checkbox onChange={this.handleCheckbox} checked={record.AUTHORITY_EDIT} value={record.ID} />),
      },
    ];
  handleCheckbox=(e) => {
    console.log(`checked = ${e.target.checked}`, e.target.value);
    
    ......
  }
Mar.09,2021

each check in the line is recorded in the dataSource.

  • columus
.handleCheckbox(e.target.checked, 'AUTHORITY_CHECK', record.ID)} checked={record.AUTHORITY_CHECK} value={record.ID}

 checked  
 
 valuedefaultValue   
 
Menu