浏览代码

Fixed removeAll bug in the last page when sidePagination is server

zhixin 6 年之前
父节点
当前提交
27518effd5
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      src/bootstrap-table.js

+ 8 - 0
src/bootstrap-table.js

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