Skip to content
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

Implement infinite scrolling for document search #3855

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

tillprochaska
Copy link
Contributor

When searching a large document in a dataset which has a significant number of results, only the first set of results are shown.

I’ve fixed this by implementing infinite scrolling in the same way we already implement this for other views (such as the main search view). Now, when a user has scrolled to the end of the search results list and if there are more results, the next page of results is automatically loaded.

In addition, I’ve used the opportunity to do some cleanup and remove dead code from the component responsible for displaying document search results.

This is just a small refactoring to make it easier to adjust this method.
… because that is what it actually does -- it doesn’t load a page from the document, it loads a list of pages that contain the search terms.
I’m not sure what exactly the intention here was originally, but it didn’t have any effect in its current version. `page` and `res.index` would always be undefined and as a result, the `active` class was applied to every single link. The `active` class doesn’t apply any styles.

Probably this is just leftover from a previous iteration of the UI, so I’ve removed this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant