sul-dlss / earthworks

Geospatial discovery application for Stanford University Libraries.
https://earthworks.stanford.edu
Other
21 stars 3 forks source link

Record view when there's just 1 of 1 in search results #1367

Open dbranchini opened 1 week ago

dbranchini commented 1 week ago

Steps to reproduce:

  1. Search for something by name
  2. Just one result in search results
  3. Go to the record view

What's happening: It shows nothing where you usually see paging (previous/next) and 1 of x.

What should happen: It shows 1 of 1.

Image

hudajkhan commented 1 week ago

The issue appears to be that in Blacklight, the pagination component renders if all of the following conditions are true:

In the case where there is only one search result, the search context appears to not have a previous or next value. Due to this, the component is never rendered. We will have to make a PR in Blacklight to address this.

hudajkhan commented 1 week ago

For reference: https://github.com/projectblacklight/blacklight/blob/main/app/components/blacklight/search_context/server_item_pagination_component.rb#L15

hudajkhan commented 1 week ago

The related blacklight issue has a PR. If that is merged, then with us pulling from blacklight's main branch, we should get the same functionality.