8000 fix(js): remove getFieldIndexFromColumnIndex because it cause events bug · chavp/bootstrap-table@9d71d54 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9d71d54

Browse files
committed
fix(js): remove getFieldIndexFromColumnIndex because it cause events bug
1 parent 398b0a1 commit 9d71d54

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/bootstrap-table.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,6 @@
5555
return index;
5656
};
5757

58-
var getFieldIndexFromColumnIndex = function (columns, fieldIndex) {
59-
$.each(columns, function (i, column) {
60-
if (!column.visible) {
61-
fieldIndex--;
62-
}
63-
});
64-
return fieldIndex;
65-
};
66-
6758
// http://jsfiddle.net/wenyi/47nz7ez9/3/
6859
var setFieldIndex = function (columns) {
6960
var i, j, k,
@@ -1863,7 +1854,7 @@
18631854
}
18641855

18651856
var field = that.header.fields[i],
1866-
fieldIndex = getFieldIndexFromColumnIndex(that.columns, i);
1857+
fieldIndex = $.inArray(field, that.getVisibleFields());
18671858

18681859
if (that.options.detailView && !that.options.cardView) {
18691860
fieldIndex += 1;

0 commit comments

Comments
 (0)
0