mirror of
https://github.com/gosticks/react-bootstrap-table2.git
synced 2025-10-16 11:55:39 +00:00
fix row-pure-content will not update in some case
This commit is contained in:
parent
fa13550d8c
commit
1e76ca9bdb
@ -7,10 +7,8 @@ import Cell from '../cell';
|
||||
|
||||
export default class RowPureContent extends React.Component {
|
||||
shouldComponentUpdate(nextProps) {
|
||||
if (typeof this.props.shouldUpdate !== 'undefined') {
|
||||
if (nextProps.shouldUpdate === this.props.shouldUpdate) {
|
||||
return false;
|
||||
}
|
||||
if (typeof nextProps.shouldUpdate !== 'undefined') {
|
||||
return nextProps.shouldUpdate;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -23,8 +23,8 @@ export default ExtendBase =>
|
||||
const shouldUpdate =
|
||||
this.props.rowIndex !== nextProps.rowIndex ||
|
||||
this.props.editable !== nextProps.editable ||
|
||||
!_.isEqual(this.props.row, nextProps.row ||
|
||||
this.props.columns.length !== nextProps.columns.length);
|
||||
!_.isEqual(this.props.row, nextProps.row) ||
|
||||
this.props.columns.length !== nextProps.columns.length;
|
||||
|
||||
return shouldUpdate;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user