Skip to content

Commit

Permalink
Call this.inherited(arguments) in _destroyColumn so that cleanup take…
Browse files Browse the repository at this point in the history
…s place in ColumnReorder+ColumnSet, fixes #396
  • Loading branch information
kriszyp committed Jan 21, 2013
1 parent abf2662 commit 99034a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions ColumnSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ function(kernel, declare, Deferred, listen, aspect, query, has, put, hasClass, G
}
}
}
this.inherited(arguments);
},
configStructure: function(){
this.columns = {};
Expand Down
8 changes: 5 additions & 3 deletions Grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,9 @@ function(kernel, declare, listen, has, put, List){
// destroy methods (defined by plugins) and calls them. This is called
// immediately before configuring a new column structure.

var subRowsLength = this.subRows.length,
var subRows = this.subRows,
// if we have column sets, then we don't need to do anything with the missing subRows, ColumnSet will handle it
subRowsLength = subRows && subRows.length,
i, j, column, len;

// First remove rows (since they'll be refreshed after we're done),
Expand All @@ -379,8 +381,8 @@ function(kernel, declare, listen, has, put, List){
this.cleanup();

for(i = 0; i < subRowsLength; i++){
for(j = 0, len = this.subRows[i].length; j < len; j++){
column = this.subRows[i][j];
for(j = 0, len = subRows[i].length; j < len; j++){
column = subRows[i][j];
if(typeof column.destroy === "function"){ column.destroy(); }
}
}
Expand Down

0 comments on commit 99034a0

Please sign in to comment.