From 8cf61fb415d6df3c697c8ad7ca7a93f83ecff7cb Mon Sep 17 00:00:00 2001 From: Bhavesh Nigam Date: Mon, 26 Oct 2015 09:50:42 +0530 Subject: [PATCH] Fix selection dropdown functionality for columns which are not visible in selection. --- src/internal.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/internal.js b/src/internal.js index 9b9bba4..daec0dc 100644 --- a/src/internal.js +++ b/src/internal.js @@ -91,6 +91,11 @@ function isVisible(column) return column.visible; } +function isVisibleAndVisibleInSelection(column) +{ + return column.visible && column.visibleInSelection; +} + function loadColumns() { var that = this, @@ -386,7 +391,7 @@ function renderColumnSelection(actions) if (!checkbox.prop("disabled")) { column.visible = checkbox.prop("checked"); - var enable = that.columns.where(isVisible).length > 1; + var enable = that.columns.where(isVisibleAndVisibleInSelection).length > 1; $this.parents(itemsSelector).find(selector + ":has(" + checkboxSelector + ":checked)") ._bgEnableAria(enable).find(checkboxSelector)._bgEnableField(enable);