Both the data and the table columns I want to display are input properties in my module. Now I want to be able to give my column configuration data a flag that makes it so, that those columns are initially autosized. Finding the right columns, and executing the .autosize()
function is trivial enough, but I miss a fitting event emitter on the grid itself.
(onColumnInit)
seemed promising, but looking at the error text I get in my console I get the impression that one is executed before the table is even filled.
I used the official API reference, but couldn't find what I'm looking for: an event that's called when the table id done, when all data is prepared, when the table is filled, and thus ready to get resized.
If there's an alternative elegant solution I'm thankful for that too, I even played around with lifecyclehooks in my component, but as expected that's hardly a solution.
In short, I have a table control module, that functions as an internal container for the igx-grid itself, it provides our interface to the rest of the project. it gets fed with the data itself, and 'table fields', that define the field name (in the date), the shown column name, data types, and useful tags like whether the column should be sortable or not. Similarly I want to implement a tag that allows initial autosizing.