Hello,
I'm using ag-grid-react and setting the column state on onGridReady with something like:
api.columnpApi.setColumnState(previously_saved_state)
I can see that works but as soon as the row-data gets loaded (the ReactJS way), the column state gets reset to the default one.
I have also tried setting the state in onRowDataChanged and other callbacks and they either fail or ignore the restored state.
Thanks.
I've raised a high priority issue (AG-353) our side for this. We'll update this thread with updates as soon as we have any
cannot reproduce. i went to main demo and set some column state (sort, filter, reorder) and then called gridOptions.api.setRowData([]); (using the debug console) and the data reset, but all column state was retained.
maybe you are loosing filter because you don't have newRowsAction='keep'
@pupeno are you referring to filter state when you say its being reset?
If so, set filterParams: {newRowsAction: 'keep'} on the column(s) you want to maintain state, or on
gridOptions.defaultColDef to be global
Most helpful comment
@pupeno are you referring to filter state when you say its being reset?
If so, set filterParams: {newRowsAction: 'keep'} on the column(s) you want to maintain state, or on
gridOptions.defaultColDef to be global