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.
onSort is not a function
1 parent 1aa4bbc commit f534b30Copy full SHA for f534b30
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