Browse Source

Fixed the page-change event before init server

zhixin 5 years ago
parent
commit
c8597dcdb4
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/bootstrap-table.js

+ 3 - 2
src/bootstrap-table.js

@@ -1176,13 +1176,14 @@ class BootstrapTable {
     }
     }
 
 
     this.initPagination()
     this.initPagination()
+
+    this.trigger('page-change', this.options.pageNumber, this.options.pageSize)
+
     if (this.options.sidePagination === 'server') {
     if (this.options.sidePagination === 'server') {
       this.initServer()
       this.initServer()
     } else {
     } else {
       this.initBody()
       this.initBody()
     }
     }
-
-    this.trigger('page-change', this.options.pageNumber, this.options.pageSize)
   }
   }
 
 
   onPageListChange (event) {
   onPageListChange (event) {