We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1aa4bbc + f534b30 commit c1d1d72Copy full SHA for c1d1d72
packages/react-bootstrap-table2/src/contexts/index.js
@@ -85,11 +85,11 @@ const withContext = Base =>
85
}
86
87
UNSAFE_componentWillReceiveProps(nextProps) {
88
- if (nextProps.columns.filter(col => col.sort).length > 0 && !this.SortContext) {
+ if (nextProps.columns.filter(col => col.sort).length <= 0) {
89
+ this.SortContext = null;
90
+ } else if (!this.SortContext) {
91
this.SortContext = createSortContext(
92
dataOperator, this.isRemoteSort, this.handleRemoteSortChange);
- } else {
- this.SortContext = null;
93
94
if (!nextProps.pagination && this.props.pagination) {
95
this.PaginationContext = null;
0 commit comments