标签:tst selection pre stat state color des script net
https://blog.csdn.net/weixin_33940102/article/details/88596485
clearCheck = () => { // 处理勾选数据后清空勾选 this.setState({ selectedRowKeys: [] }) } render () { const rowSelection = { onChange: (selectedRowKeys) => { this.setState({ selectedRowKeys, }) } } }
this.state = {
selectedRowKeys: []
}
clearCheck = () => { // 处理勾选数据后清空勾选
this.setState({
selectedRowKeys: []
})
}
render () {
const rowSelection = {
selectedRowKeys, //这里是起作用的关键
onChange: (selectedRowKeys) => {
this.setState({
selectedRowKeys
})
}
}
}
标红加粗的地方是关键。
rowSelection 是一个对象,selectedRowKeys 是该对象下初始选择项的配置
标签:tst selection pre stat state color des script net
原文地址:https://www.cnblogs.com/winyh/p/13218920.html