"10 $digest iterations reached" because of resizing hidden grids
I have this quite weird issue when putting multiple grid in a ui-bootstrap tab. The hidden ones trigger a mechanism to calculate some width-relate variable (about line 265 in ng-grid-2.0.7.debug.js):
if (grid.$root.is(':hidden')) {
grid.elementDims.rootMaxW = domUtilityService.getRealWidth(grid.$root);
}
At the same time I have my own strategy to dynamically resize grids to fit them in my (complex) layout. It looks like the 2 things can not live together, the code above starts exploding repeatedly and everything gets broken (and IE9 gets stuck). If I just comment out the above code everything works like a charm. On the other hand, if I do not resize grids dynamically, no errors occur. My resizing code is complex in deciding the new size of the grid, and therefore I need it like that, but after that it becomes just trivial, and basically on a resize event I recalculate height and width of the grid...
I cannot really provide a repro easily, but something odd goes on in getRealWidth, do someone think it's possible to have a look? Alternatively, these bits of code are trying to do something that actually could be useless in specific cases (like mine), would you think it could be made optional?
Right now I removed that code and things work fine.
Thanks
Wasp