-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scroll to row programatically with virtual paging/infinite scrolling. #1237
Comments
go to here: |
how can you show the row as selected after you jump to the row |
I'm having trouble selecting the row after ensuring it's visible. use case: large virtual table, double click jumps to the details page for that row. When user navigates back, to the list I want to table to show where they were. ensureIndexVisible properly restores the table with the row showing, but now, I want that row to be selected. GridApi.selectIndex prints a warning telling me to use node.setSelected: but right after calling ensureIndexVisible, I don't have that node. So I've hooked up into the onModelUpdated events and do a foreachNode until I find my node and can select it. while this works, ag-grid prints a warning that : But this seems fragile and overly complicated. any suggestion? Tx. |
hi @jml3on 4 years later I'm trying to do the same thing... wondering where you able to find a more robust solution? |
nope. but it looks like closed issues never get looked at, so you should probably open a new one. |
my workaround , starting point was the same 'jump to 500' official example. I'm using the community version with Infinite model, I guess will never have an answer here from ag-grid. but I guess quite similar to the server-end model. |
Hi, I've tried api.selectNode(node, true) mentioned in #381 and ensureIndexVisible(index) in #907, however I'm using virtual paging / infinite scrolling with i.e. paginationPageSize: 100.
So, when I get the data modified and issue a setDatasource(mydatasource) so my table gets refreshed it inmediately positions into its first page (0-99) and trying i.e. ensureIndexVisible(1000) returns an error.
Is there a way to, programatically, jump to a specific page (offset) or scroll to any row (I guess triggering a new request for an specific page) ?
Thanks a lot for your help in advance,
Luis
The text was updated successfully, but these errors were encountered: