File tree 3 files changed +14
-0
lines changed
react-bootstrap-table2-filter/src
react-bootstrap-table2-paginator/src
react-bootstrap-table2-toolkit/src/search 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,14 @@ export default (
37
37
}
38
38
}
39
39
40
+ componentWillReceiveProps ( nextProps ) {
41
+ if ( isRemoteFiltering ( ) ) {
42
+ this . setState ( {
43
+ data : nextProps . data
44
+ } ) ;
45
+ }
46
+ }
47
+
40
48
onFilter ( column , filterType , initialize = false ) {
41
49
return ( filterVal ) => {
42
50
// watch out here if migration to context API, #334
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ class StateProvider extends React.Component {
52
52
if ( this . isRemotePagination ( ) || custom ) {
53
53
this . currPage = nextProps . pagination . options . page ;
54
54
this . currSizePerPage = nextProps . pagination . options . sizePerPage ;
55
+ this . dataSize = nextProps . pagination . options . totalSize ;
55
56
}
56
57
}
57
58
Original file line number Diff line number Diff line change 1
1
/* eslint react/prop-types: 0 */
2
2
/* eslint react/require-default-props: 0 */
3
3
/* eslint no-continue: 0 */
4
+ /* eslint no-lonely-if: 0 */
4
5
import React from 'react' ;
5
6
import PropTypes from 'prop-types' ;
6
7
@@ -44,6 +45,10 @@ export default (options = {
44
45
data : result
45
46
} ) ;
46
47
}
48
+ } else {
49
+ if ( isRemoteSearch ( ) ) {
50
+ this . setState ( { data : nextProps . data } ) ;
51
+ }
47
52
}
48
53
}
49
54
You can’t perform that action at this time.
0 commit comments