ソースを参照

Fixed showRow method show all hidden rows bug

zhixin 5 年 前
コミット
fc2f3ae6c8
2 ファイル変更5 行追加6 行削除
  1. 1 0
      CHANGELOG.md
  2. 4 6
      src/bootstrap-table.js

+ 1 - 0
CHANGELOG.md

@@ -20,6 +20,7 @@ ChangeLog
 - **Update:** Fixed the `page-change` event before init server.
 - **Update:** Fixed `font-size` of the loading text.
 - **Update:** Fixed table `border` bug when table is hidden.
+- **Update:** Fixed `showRow` method show all hidden rows bug.
 
 #### Extensions
 

+ 4 - 6
src/bootstrap-table.js

@@ -2339,18 +2339,16 @@ class BootstrapTable {
     } else if (visible && index > -1) {
       this.hiddenRows.splice(index, 1)
     }
-    if (visible) {
-      this.updatePagination()
-    } else {
-      this.initBody(true)
-      this.initPagination()
-    }
+
+    this.initBody(true)
+    this.initPagination()
   }
 
   getHiddenRows (show) {
     if (show) {
       this.initHiddenRows()
       this.initBody(true)
+      this.initPagination()
       return
     }
     const data = this.getData()