Browse Source

Update src/extensions/reorder-rows/bootstrap-table-reorder-rows.js

Co-authored-by: 文翼 <wenzhixin2010@gmail.com>
Sheikh Abdul Manan 2 years ago
parent
commit
5a6460348f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/extensions/reorder-rows/bootstrap-table-reorder-rows.js

+ 1 - 1
src/extensions/reorder-rows/bootstrap-table-reorder-rows.js

@@ -112,7 +112,7 @@ $.BootstrapTable = class extends $.BootstrapTable {
     const draggingRow = this.data[this.draggingIndex]
     const droppedIndex = newData.indexOf(this.data[this.draggingIndex])
     const droppedRow = this.data[droppedIndex]
-    const index = ((pageNum - 1)*pageSize) + this.options.data.indexOf(this.data[droppedIndex])
+    const index = (pageNum - 1) * pageSize + this.options.data.indexOf(this.data[droppedIndex])
 
     this.options.data.splice(this.options.data.indexOf(draggingRow), 1)
     this.options.data.splice(index, 0, draggingRow)