Hearen / antd-demo

Used to check the features of antd
MIT License
0 stars 0 forks source link

Filter match -> no match will result in unexpected #11

Open Hearen opened 6 years ago

Hearen commented 6 years ago
Hearen commented 6 years ago

savior is okay but not enough; we can use a flag to remove the checkbox

Hearen commented 6 years ago

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;

Hearen commented 6 years ago
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