Skip to content

Infinite Scroll not working when reusing a grid #2827

@PhilBroadbent

Description

@PhilBroadbent

Infinite scroll doesn't seem to work when reusing a grid which previously hit the end.... Makes sense that the callback would stop triggering if the listener is unregistered or something, but how to make this work?

I have a search form with some parameters in, i click search and then it queries the database and returns results which are put into this grid. I do a search, look at the data/scroll etc, then do another search. The data in the grid is wiped and the new data put in. (I.e. using same grid) - from this I notice 2 problems:

  1. When I perform a second database search the scroll position does not reset to the top – and without using a new directive (cellNav) to scrollTo, I don’t know how.

  2. Similar to this, infinite scrolling seems to stop working when you do a new search.

Is there a way to recreate the DOM element, or get the grid refreshed (do it's initialization and call registerGridApi again)?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions