angular-ui/ui-grid

FastWatch: redraw issues and console errors

Open

#3.738 geöffnet am 9. Juni 2015

Auf GitHub ansehen
 (3 Kommentare) (0 Reaktionen) (1 zugewiesene Person)JavaScript (2.496 Forks)batch import
help wantedtype: bug

Repository-Metriken

Stars
 (5.395 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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)

Contributor Guide