Browse Source

fix(js): Fix event cannot work when some columns are hideen

zhixin 9 years ago
parent
commit
304ff712c9
1 changed files with 3 additions and 6 deletions
  1. 3 6
      src/bootstrap-table.js

+ 3 - 6
src/bootstrap-table.js

@@ -57,12 +57,9 @@
 
     var getFieldIndexFromColumnIndex = function (columns, fieldIndex) {
         $.each(columns, function (i, column) {
-          if (!column.visible) {
-            fieldIndex--;
-          }
-          if (i == fieldIndex) {
-            return false;
-          }
+            if (!column.visible) {
+                fieldIndex--;
+            }
         });
         return fieldIndex;
     };