Skip to content

Commit

Permalink
fix(Table): The component will receive props _checked fail.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Apr 13, 2018
1 parent ef10c06 commit 097e33f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/table/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,16 @@ export default class Table extends Component {
if (item._disabled) rowsDisabled[idx] = item;
if (item._checked) rowsChecked[idx] = item;
});
this.setState({ data: nextProps.data, rowsDisabled, rowCheckedDisable });
this.setState({
data: nextProps.data.map((item) => {
delete item._checked;
delete item._disabled;
return item;
}),
rowsDisabled,
rowsChecked,
rowCheckedDisable,
});
}
if (nextProps.columns !== this.props.columns) {
this.setState({ columns: nextProps.columns });
Expand Down

0 comments on commit 097e33f

Please sign in to comment.