I am facing an issue with my application that involves persisting sorting and filtering criteria for an ag-grid control. We are utilizing server-side sorting and filtering, so once the sort and filter criteria are loaded, the grid data is then loaded accordingly.
Upon initial loading of the grid, the displayed row data is correct based on the persisted sort and filter data. However, there is no indication in the grid, such as sort or filter icons, to show that the sort/filter is in place. How can I make sure these indicators are displayed when the data is initially loaded?
I attempted using the gridOptions.api.setFilterModel() method, but encountered issues where calling it before the data load resulted in an exception. Calling it after the data was loaded caused the data to reload, leading to an infinite loop.
I managed to set the "sort" property on the columnDef during grid initialization but have been unsuccessful in doing the same with the filter data.
It's worth mentioning that we are also using an Angular 2 filter component (implementing AgFilterComponent) with a "filterFramework" property set in the columnDef.
Thanks, Stuart.