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   
 
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4f605-44868.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4f605-44868.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?