File tree 2 files changed +10
-3
lines changed
2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ class BootstrapTable extends Component {
96
96
colInfos : this . colInfos ,
97
97
multiColumnSearch : props . multiColumnSearch ,
98
98
multiColumnSort : props . multiColumnSort ,
99
- remote : this . isRemoteDataSource ( )
99
+ remote : this . props . remote
100
100
} ) ;
101
101
}
102
102
@@ -203,8 +203,12 @@ class BootstrapTable extends Component {
203
203
}
204
204
205
205
if ( this . isRemoteDataSource ( ) ) {
206
+ let data = nextProps . data . slice ( ) ;
207
+ if ( nextProps . pagination && ! this . allowRemote ( Const . REMOTE_PAGE ) ) {
208
+ data = this . store . page ( page , sizePerPage ) . get ( ) ;
209
+ }
206
210
this . setState ( {
207
- data : nextProps . data . slice ( ) ,
211
+ data,
208
212
currPage : page ,
209
213
sizePerPage,
210
214
reset : false
Original file line number Diff line number Diff line change @@ -599,7 +599,10 @@ export class TableDataStore {
599
599
600
600
if ( _data . length === 0 ) return _data ;
601
601
602
- if ( this . remote || ! this . enablePagination ) {
602
+ const remote = typeof this . remote === 'function' ?
603
+ ( this . remote ( Const . REMOTE ) ) [ Const . REMOTE_PAGE ] : this . remote ;
604
+
605
+ if ( remote || ! this . enablePagination ) {
603
606
return _data ;
604
607
} else {
605
608
const result = [ ] ;
You can’t perform that action at this time.
0 commit comments