Skip to content

Commit

Permalink
Only execute a remove call if the remove handler exists. If a column …
Browse files Browse the repository at this point in the history
…is already hidden, don't try to hide it again.
  • Loading branch information
Matthew Maxwell committed Mar 6, 2013
1 parent 1432dcc commit 4d31dc2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion extensions/ColumnHider.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ function(declare, has, listen, miscUtil, put){
// Use miscUtil function directly, since we clean these up ourselves anyway
var selectorPrefix = "#" + miscUtil.escapeCssIdentifier(this.domNode.id) + " .dgrid-column-",
next, rules, i; // used in IE8 code path

if (this._columnHiderRules[id]) {
return;
}

if(has("ie") === 8 && !has("quirks")){
// Avoid inconsistent behavior in IE8 when display: none is set on a cell
Expand Down Expand Up @@ -249,7 +253,7 @@ function(declare, has, listen, miscUtil, put){
// method for more information.

if(!hidden){
this._columnHiderRules[id].remove();
this._columnHiderRules[id] && this._columnHiderRules[id].remove();
delete this._columnHiderRules[id];
}else{
this._hideColumn(id);
Expand Down

0 comments on commit 4d31dc2

Please sign in to comment.