Skip to content

Commit

Permalink
Merge pull request #466 from SitePenMatthewMaxwell/ColumnHider
Browse files Browse the repository at this point in the history
Fix #464: Only execute a remove call if a handle exists.

If a column is already hidden, don't repeat hide logic, otherwise it can't be re-shown.
  • Loading branch information
SitePenKenFranqueiro committed Mar 6, 2013
2 parents ac2f36c + 4d31dc2 commit 9e077b2
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 9e077b2

Please sign in to comment.