I have an AgGrid, I'm simulating row grouping by rendering a table within a full width row. Each time a row is "expanded", a full width row appears below it with it's own table contents. Each time a row is "expanded" I also increase the amount of rows per Pagination Page (this keeps the last row's child on the same page even if the pagination page is full. (It should also be stated that only one child can be expanded at a time))
The issue I'm having is if a user changes pages (I.E. from page 1 to page 2) while there is a an expanded record on page 1, it will mess up future "expands" (since the rowsPerPage did not have an opportunity to reduce itself again)
I'm looking for a way to redraw the table when the page is changed, but if i use onPaginationChanged it triggers every time a row is expanded (Since the PagniationPageSize changes dynamically on row-expansion)
Is there a way to trigger an event each time a user directs to a new page, but not when the Pagniation Page Size changes.
Thank you and sorry in advance.