Ag-Grid offers the method ensureIndexVisible(index, 'middle');
With that method it is easy to scroll to an choosen index. But how do I get the last known index of the scrolling position from the user?
An example: We have a table with 600 rows. The user is scrolling around - an update happens. The table changed a bit. Now I have the behaviour that the table is scrolling to the top. The user has now to scroll again to his last position.
I would like to redirect the user to hist last scrolling position: ensureIndexVidisble(USERS_LAST_KNOWN_SCROLLING_POSITION, 'middle');
In addition to information: the user does not work in the table. So I cannot save his last click on a row.
How can I achieve this?
//EDIT / TIP
If you want to do yourself a favor, you should switch to react-table
from Tanstack not ag grid company.