I have a scenario where after the grid rows are filtered by a column and then when grid refreshes the filter state is intact but the rows are expanded after view is loaded.
Is there a way to collapse the rows every time after the view is rendered?
You can use grid's collapseAll method in order to collapse all rows. Putting it in ngAfterViewInit will have it called on each reload.
Are the rows being expanded on purpose? If you believe this is not the intended behavior of the grid, please provide steps to reproduce this behavior so we can test on our side what might be causing it.
Tihomir TonevSoftware DeveloperInfragistics
In the below Sample where we are using custom filtering by default all the rows are expanded. If I collapse all the rows and filter the first column for two rows and after filtering done the rows are all collapsed.
In my scenario after filtering the rows should be collapsed.
When I debug through the igniteui-angular script file I found that in the IgxTreeGridFilteringPipe class has expandAllRecursive function where we're actually setting expandedStates.set(rec.rowID, true); the row expand state to be true. Is there any way to override it from the code?
The method mentioned is private, so at this point it cannot be accessed on application level.
I have tested the provided sample and the tree is expanding only the records with filtering match, which is the intended behavior so I could not find anything out of the normal.
If I am missing something, please let me know.