Browse Source

Fixed removeAll bug in the last page when sidePagination is server

zhixin 6 years ago
parent
commit
27518effd5
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/bootstrap-table.js

+ 8 - 0
src/bootstrap-table.js

@@ -1654,6 +1654,14 @@ class BootstrapTable {
         if (!silent) {
           this.hideLoading()
         }
+
+        if (
+          this.options.sidePagination === 'server' &&
+          res[this.options.totalField] > 0 &&
+          !res[this.options.dataField].length
+        ) {
+          this.updatePagination()
+        }
       },
       error: jqXHR => {
         let data = []