Skip to content

Commit f7a1375

Browse files
committed
Fixed issue with showing/hiding columns
1 parent 4f433cd commit f7a1375

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 1.4.2
4+
5+
### Bug Fixes
6+
- Fixed bug with showing/hiding columns
7+
38
## 1.4.1
49

510
### Bug Fixes

dist/jquery.bootgrid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ function renderColumnSelection(actions) {
361361
var $this = $(this),
362362
checkbox = $this.find(checkboxSelector);
363363
if (!checkbox.prop("disabled")) {
364+
column.visible = checkbox.prop("checked");
364365
var enable = that.columns.where(isVisible).length > 1;
365366
$this.parents(itemsSelector).find(selector + ":has(" + checkboxSelector + ":checked)")
366367
._bgEnableAria(enable).find(checkboxSelector)._bgEnableField(enable);
@@ -372,7 +373,6 @@ function renderColumnSelection(actions) {
372373
})
373374
.on("change" + namespace, checkboxSelector, function(e){
374375
var $this = $(this);
375-
column.visible = $this.prop("checked");
376376
that.element.trigger('toggleColumn', [column.id, column.text, column.visible]);
377377
});
378378
dropDown.find(getCssSelector(css.dropDownMenuItems)).append(item);

src/internal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ function renderColumnSelection(actions) {
351351
var $this = $(this),
352352
checkbox = $this.find(checkboxSelector);
353353
if (!checkbox.prop("disabled")) {
354+
column.visible = checkbox.prop("checked");
354355
var enable = that.columns.where(isVisible).length > 1;
355356
$this.parents(itemsSelector).find(selector + ":has(" + checkboxSelector + ":checked)")
356357
._bgEnableAria(enable).find(checkboxSelector)._bgEnableField(enable);
@@ -362,7 +363,6 @@ function renderColumnSelection(actions) {
362363
})
363364
.on("change" + namespace, checkboxSelector, function(e){
364365
var $this = $(this);
365-
column.visible = $this.prop("checked");
366366
that.element.trigger('toggleColumn', [column.id, column.text, column.visible]);
367367
});
368368
dropDown.find(getCssSelector(css.dropDownMenuItems)).append(item);

0 commit comments

Comments
 (0)