Skip to content

Commit 4cf6e65

Browse files
committed
fix #979
1 parent 40c5ae7 commit 4cf6e65

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

packages/react-bootstrap-table2/src/row/aggregate-row.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ export default class RowAggregator extends shouldUpdater(eventDelegater(React.Co
3737
this.props.selectable !== nextProps.selectable ||
3838
this.shouldUpdatedBySelfProps(nextProps)
3939
) {
40-
this.shouldUpdateRowContent = this.shouldUpdateChild(nextProps);
40+
this.shouldUpdateRowContent = this.shouldRowContentUpdate(nextProps);
4141
return true;
4242
}
43-
this.shouldUpdateRowContent = this.shouldUpdateChild(nextProps);
43+
this.shouldUpdateRowContent = this.shouldRowContentUpdate(nextProps);
4444

4545
return this.shouldUpdateRowContent;
4646
}

packages/react-bootstrap-table2/src/row/should-updater.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,9 @@ export default ExtendBase =>
4848
return this.shouldUpdateByCellEditing(nextProps) ||
4949
this.shouldUpdatedByNormalProps(nextProps);
5050
}
51+
52+
shouldRowContentUpdate(nextProps) {
53+
return this.shouldUpdateChild(nextProps) ||
54+
this.shouldUpdateByColumnsForSimpleCheck(nextProps);
55+
}
5156
};

packages/react-bootstrap-table2/src/row/simple-row.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ class SimpleRow extends shouldUpdater(eventDelegater(Component)) {
1515

1616
shouldComponentUpdate(nextProps) {
1717
this.shouldUpdateRowContent = false;
18-
this.shouldUpdateRowContent =
19-
this.shouldUpdateChild(nextProps) || this.shouldUpdateByColumnsForSimpleCheck(nextProps);
18+
this.shouldUpdateRowContent = this.shouldRowContentUpdate(nextProps);
2019
if (this.shouldUpdateRowContent) return true;
2120

2221
return this.shouldUpdatedBySelfProps(nextProps);

0 commit comments

Comments
 (0)