修复表格全选反选不同步的问题

This commit is contained in:
2betop 2020-09-03 18:29:26 +08:00
parent d188f9f8eb
commit 14a1225a21

View File

@ -55,7 +55,11 @@ export class TableContent extends React.Component<TableContentProps> {
const rows = props.rows;
this.reaction = reaction(
() => `${rows.map(item => item.id).join(',')}`,
() =>
`${rows.map(item => item.id).join(',')}${rows
.filter(item => item.checked)
.map(item => item.id)
.join(',')}`,
() => this.forceUpdate(),
{
onError: () => this.reaction!()