ソースを参照

Updating fieldsColumnsIndex

djhvscf 6 年 前
コミット
462b5b0c1d

+ 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