Posted 14 September 2017, 12:01 pm EST
This is an Angular2 project. I’ve have a flex-grid defined with the following parameters:
<wj-flex-grid #flex [itemsSource]="data" [headersVisibility]="1" (updatedView)="viewUpdatedFlex($event)" [allowResizing]="'Columns'" [autoSizeMode] = "'Both'">
And on updatedView, the function I’m calling is this:
viewUpdatedFlex() { var self = this; setTimeout(function() { self.flex.autoSizeColumns(); },300); }
I’m calling autoSizeColumns() on the grid when the view has changed, and I have a set of radio buttons that conditionally shows/hides some of the column in the grid. When the grid loads, it works fine and the column resizes, when I toggle the columns on and off, the resize works for a few times, then stops responding completely.
Is ‘updatedView’ the best hook to leverage for this?
Should I be able to call this function more than once without it becoming unresponsive?