Permalink
Browse files

Run column.destroy upon grid destruction as well

  • Loading branch information...
1 parent 6aa6008 commit dbf820d1186d8179055fcb5ff6709ab5ec8f82eb Kenneth G. Franqueiro committed Jun 7, 2012
Showing with 6 additions and 7 deletions.
  1. +6 −0 Grid.js
  2. +0 −7 editor.js
View
@@ -256,6 +256,12 @@ function(kernel, declare, listen, has, put, List){
}
},
+ destroy: function(){
+ // Run _destroyColumns first to perform any column plugin tear-down logic.
+ this._destroyColumns();
+ this.inherited(arguments);
+ },
+
_setSort: function(property, descending){
// summary:
// Extension of List.js sort to update sort arrow in UI
View
@@ -346,13 +346,6 @@ return function(column, editor, editOn){
// Create one shared widget/input to be swapped into the active cell.
column.editorInstance = createSharedEditor(column, originalRenderCell);
-
- if(isWidget){
- // Clean up shared widget instance when the grid is destroyed.
- listeners.push(aspect.before(grid, "destroy", function(){
- column.editorInstance.destroyRecursive();
- }));
- }
} : function(){
var grid = column.grid;
if(!grid.edit){ grid.edit = edit; }

0 comments on commit dbf820d

Please sign in to comment.