fix: Table 视图可能不更新问题

This commit is contained in:
2betop 2021-07-02 20:13:27 +08:00
parent 709042caa6
commit 5f765377ce

View File

@ -500,6 +500,7 @@ export default class Table extends React.Component<TableProps, object> {
}
}
console.log(updateRows, rows);
updateRows && store.initRows(rows, props.getEntryId);
typeof props.selected !== 'undefined' &&
store.updateSelected(props.selected, props.valueField);
@ -2287,6 +2288,10 @@ export default class Table extends React.Component<TableProps, object> {
translate
} = this.props;
// 理论上来说 store.rows 应该也行啊
// 不过目前看来只有这样写它才会重新更新视图
store.rows.length;
return (
<TableContent
tableClassName={cx(