Browse Source

Updating fieldsColumnsIndex

djhvscf 6 years ago
parent
commit
462b5b0c1d

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

@@ -140,10 +140,13 @@ BootstrapTable.prototype.makeRowsReorderable = function () {
         if (columnIndex !== -1) {
         if (columnIndex !== -1) {
           that.columns[columnIndex].fieldIndex = i
           that.columns[columnIndex].fieldIndex = i
           columns.push(that.columns[columnIndex])
           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
       that.columns = columns
 
 
       filterFn() // Support <IE9
       filterFn() // Support <IE9