Skip to content

Commit 84e2434

Browse files
committed
(fix): Fix #4687 - Memory leaks - grid object not getting destroyed
Prevent the grid column's hideColumn method being overridden each time a GridColumn is constructed
1 parent a8b909d commit 84e2434

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/js/core/factories/GridColumn.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,6 @@ angular.module('ui.grid')
9797

9898
self.updateColumnDef(colDef, true);
9999

100-
/**
101-
* @ngdoc function
102-
* @name hideColumn
103-
* @methodOf ui.grid.class:GridColumn
104-
* @description Hides the column by setting colDef.visible = false
105-
*/
106-
GridColumn.prototype.hideColumn = function() {
107-
this.colDef.visible = false;
108-
};
109-
110100
self.aggregationValue = undefined;
111101

112102
// The footer cell registers to listen for the rowsRendered event, and calls this. Needed to be
@@ -195,6 +185,16 @@ angular.module('ui.grid')
195185
};
196186
}
197187

188+
/**
189+
* @ngdoc function
190+
* @name hideColumn
191+
* @methodOf ui.grid.class:GridColumn
192+
* @description Hides the column by setting colDef.visible = false
193+
*/
194+
GridColumn.prototype.hideColumn = function() {
195+
this.colDef.visible = false;
196+
};
197+
198198

199199
/**
200200
* @ngdoc method

0 commit comments

Comments
 (0)