Skip to content

Commit 6c77c5a

Browse files
author
Aaron Cowdrey
committed
Fixed bug 1318
Fixed bug wenzhixin#1318 with solution proposed by @SimaoLiu in wenzhixin#1313
1 parent d6e9b55 commit 6c77c5a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎src/extensions/reorder-columns/bootstrap-table-reorder-columns.js‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,13 @@
9595
clickDelay:200,
9696
beforeStop: function() {
9797
var ths = [],
98+
formatters = [],
9899
columns = [],
99100
columnsHidden = [],
100101
columnIndex = -1;
101102
that.$header.find('th').each(function (i) {
102103
ths.push($(this).data('field'));
104+
formatters.push($(this).data('formatter'));
103105
});
104106

105107
//Exist columns not shown
@@ -109,6 +111,7 @@
109111
});
110112
for (var i = 0; i < columnsHidden.length; i++) {
111113
ths.push(columnsHidden[i].field);
114+
formatters.push(columnsHidden[i].formatter);
112115
}
113116
}
114117

@@ -122,9 +125,10 @@
122125

123126
that.columns = that.columns.concat(columns);
124127
that.header.fields = ths;
128+
that.header.formatters = formatters;
125129
that.resetView();
126130
that.trigger('reorder-column', ths);
127131
}
128132
});
129133
};
130-
}(jQuery);
134+
}(jQuery);

0 commit comments

Comments
 (0)