Browse Source

Updating fieldsColumnsIndex

djhvscf 6 years ago
parent
commit
462b5b0c1d
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/extensions/reorder-columns/bootstrap-table-reorder-columns.js

+ 4 - 1
src/extensions/reorder-columns/bootstrap-table-reorder-columns.js

@@ -140,10 +140,13 @@ BootstrapTable.prototype.makeRowsReorderable = function () {
         if (columnIndex !== -1) {
           that.columns[columnIndex].fieldIndex = i
           columns.push(that.columns[columnIndex])
-          // that.columns.splice(columnIndex, 1)
         }
       }
 
+      for (let i = 0; i < ths.length; i++ ) {
+        that.fieldsColumnsIndex[ths[i]] = i
+      }
+
       that.columns = columns
 
       filterFn() // Support <IE9