File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 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 {
9696 colInfos : this . colInfos ,
9797 multiColumnSearch : props . multiColumnSearch ,
9898 multiColumnSort : props . multiColumnSort ,
99- remote : this . isRemoteDataSource ( )
99+ remote : this . props . remote
100100 } ) ;
101101 }
102102
@@ -203,8 +203,12 @@ class BootstrapTable extends Component {
203203 }
204204
205205 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+ }
206210 this . setState ( {
207- data : nextProps . data . slice ( ) ,
211+ data,
208212 currPage : page ,
209213 sizePerPage,
210214 reset : false
Original file line number Diff line number Diff line change @@ -599,7 +599,10 @@ export class TableDataStore {
599599
600600 if ( _data . length === 0 ) return _data ;
601601
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 ) {
603606 return _data ;
604607 } else {
605608 const result = [ ] ;
You can’t perform that action at this time.
0 commit comments