Table adds rowSelection attribute. As long as setState selectedRowKeys is checked, it cannot be checked. There is no response when clicking on it. I do not know whether it is the bug; of antd itself
.antd version: 3.10.0
onSelectChange = (selectedRowKeys, selectedRows) => {
this.setState({selectedRowKeys,selectedRows});
}
render(){
const rowSelection = {
selectedRowKeys,
onChange: this.onSelectChange,
};
return (
<div>
<Table
rowKey={(record, index) => index}
bordered
scroll={{y:600}}
pagination={false}
loading={loading}
columns={columns}
dataSource={dataSource}
rowSelection={dataSource.length?rowSelection:null}
/>
</div>
)
}