Hi,
I'm using the react version of the agGrid library with redux. When I update the state it causes a refresh of the table and removes the currently selected sort option. Is there an option similar to newRowsAction for sorting that keeps the sort order?
the grid does not loose sort when you update the rows. you must be completely destroying the grid and creating it again from scratch.
Worked out what it was - Inside my react component I was creating a new object inside the render method to represent the columns of the grid. Every time it was rendered the reference was changing and agGrid thought that the column definitions were changing therefore resetting the sorts.
yes if set in new columns, that resets the sort, as the sort is tied to the column.
Most helpful comment
Worked out what it was - Inside my react component I was creating a new object inside the render method to represent the columns of the grid. Every time it was rendered the reference was changing and agGrid thought that the column definitions were changing therefore resetting the sorts.