ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

FastWatch: redraw issues and console errors

Open tobias-schreiner opened this issue 11 years ago • 3 comments

IE 11 on Windows 7

Using fastWatch: true causes error messages on the console (see below) and issues when redrawing the table.

In the debugger, I see that the "object", which lacks the methods as stated in the console errors, is actually a number. It turns out that columnDefsWatchFunction() is called with a number as parameter n, but obviously, it expects an array. This might result from using the function as watcher not only for $scope.uiGrid.columnDefs, but also $scope.uiGrid.columnDefs.length:

deregFunctions.push( $scope.$parent.$watch(function() { return $scope.uiGrid.columnDefs.length; }, columnDefsWatchFunction) );

Commenting out this one code line solved the mentioned issues for me, but probably brings other problems, since the watch does not detect adding and removing column definitions any more.

Console errors:

TypeError: Object doesn't support property or method 'filter' at getColDef (http://localhost:8000/opsa/opsa/3rd/ui-grid/ui-grid.js:3671:5) at buildColumns (http://localhost:8000/opsa/opsa/3rd/ui-grid/ui-grid.js:3784:7) at columnDefsWatchFunction (http://localhost:8000/opsa/opsa/3rd/ui-grid/ui-grid.js:2638:11) at Scope.prototype.$digest (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:14129:23) at Scope.prototype.$apply (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:14391:13) at done (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:9567:36) at completeRequest (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:9752:7) at requestLoaded (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:9695:9) TypeError: Object doesn't support property or method 'filter' at getColDef (http://localhost:8000/opsa/opsa/3rd/ui-grid/ui-grid.js:3671:5) at buildColumns (http://localhost:8000/opsa/opsa/3rd/ui-grid/ui-grid.js:3784:7) at columnDefsWatchFunction (http://localhost:8000/opsa/opsa/3rd/ui-grid/ui-grid.js:2638:11) at Scope.prototype.$digest (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:14129:23) at Scope.prototype.$apply (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:14391:13) at done (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:9567:36) at completeRequest (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:9752:7) at requestLoaded (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:9695:9) TypeError: Object doesn't support property or method 'forEach' at Grid.prototype.assignTypes (http://localhost:8000/opsa/opsa/3rd/ui-grid/ui-grid.js:3701:5) at modifyRows (http://localhost:8000/opsa/opsa/3rd/ui-grid/ui-grid.js:4107:5) at Anonymous function (http://localhost:8000/opsa/opsa/3rd/ui-grid/ui-grid.js:2685:13) at processQueue (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:13071:11) at Anonymous function (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:13087:27) at Scope.prototype.$eval (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:14287:9) at Scope.prototype.$digest (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:14103:15) at Scope.prototype.$apply (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:14391:13) at done (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:9567:36) at completeRequest (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:9752:7) TypeError: Object doesn't support property or method 'forEach' at Grid.prototype.assignTypes (http://localhost:8000/opsa/opsa/3rd/ui-grid/ui-grid.js:3701:5) at Anonymous function (http://localhost:8000/opsa/opsa/3rd/ui-grid/ui-grid.js:3848:9) at processQueue (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:13071:11) at Anonymous function (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:13087:27) at Scope.prototype.$eval (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:14287:9) at Scope.prototype.$digest (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:14103:15) at Scope.prototype.$apply (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:14391:13) at done (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:9567:36) at completeRequest (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:9752:7) at requestLoaded (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:9695:9) TypeError: Object doesn't support property or method 'forEach' at Grid.prototype.assignTypes (http://localhost:8000/opsa/opsa/3rd/ui-grid/ui-grid.js:3701:5) at Anonymous function (http://localhost:8000/opsa/opsa/3rd/ui-grid/ui-grid.js:3848:9) at processQueue (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:13071:11) at Anonymous function (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:13087:27) at Scope.prototype.$eval (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:14287:9) at Scope.prototype.$digest (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:14103:15) at Scope.prototype.$apply (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:14391:13) at done (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:9567:36) at completeRequest (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:9752:7) at requestLoaded (http://localhost:8000/opsa/opsa/3rd/angular/angular.js:9695:9)

tobias-schreiner avatar Jun 09 '15 16:06 tobias-schreiner

Do you know when this fix will be in ui-grid?

ZackHine avatar Dec 08 '15 14:12 ZackHine

When will this be merged ?

MartijnWelker avatar Jan 11 '16 11:01 MartijnWelker

Same here

JZehet avatar Jan 11 '16 12:01 JZehet