浏览代码

Fixed reorder row bug when side-pagination is server

飞鱼 2 年之前
父节点
当前提交
bbd5559d02
共有 2 个文件被更改,包括 5 次插入0 次删除
  1. 1 0
      CHANGELOG.md
  2. 4 0
      src/extensions/reorder-rows/bootstrap-table-reorder-rows.js

+ 1 - 0
CHANGELOG.md

@@ -12,6 +12,7 @@ ChangeLog
 #### Extensions
 
 - **Update(filter-control):** Fixed inputs losing their content when using nested attributes.
+- **Update(reorder-rows):** Fixed reorder row bug when side-pagination is server.
 
 ### 1.21.3
 

+ 4 - 0
src/extensions/reorder-rows/bootstrap-table-reorder-rows.js

@@ -116,6 +116,10 @@ $.BootstrapTable = class extends $.BootstrapTable {
 
     this.initSearch()
 
+    if (this.options.sidePagination === 'server') {
+      this.data = [...this.options.data]
+    }
+
     // Call the user defined function
     this.options.onReorderRowsDrop(droppedRow)