Open Hearen opened 6 years ago
savior is okay but not enough; we can use a flag to remove the checkbox
filter by columns has some errors - since the checkbox will be removed the inputs will be moved one step forward and the values within will be mismatched - rendered by the React;
let rowSelection = {
onChange: (selectedRowKeys, selectedRows) => { //all columns will be selected even the hidden;
this.selectedRows = selectedRows;
},
};
if(dataSource[0] && dataSource[0].isSavior) {
rowSelection = undefined;
for(const column in this.filterInputs){
if(filterRecord[column]) {
this.filterInputs[column].refs.input.value = filterRecord[column];
}
}
}
is not enough
forcefully update the input before render is meaningless