-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Pagination buttons don't update after clicking "Next" #426
Comments
Thanks for the report.
I'm closing here because it's an API issue, which should be reported to Earth Search directly. |
I think this should be reopened. Earth Search does not provide a As for the issue with Next, pagination will typically result in an empty last page, since the server code doesn't know that it has paginated through all of the results until it gets an empty result set from the database. I think this could be made more clear in stac-browser, since the last page displays the "no results were found for this filter" rather than a message that is more specific to pagination, e.g., "no more results available". |
@philvarner The prev / first page links are disabled if the server doesn't provide them. This is to avoid that the buttons move around too much. If you go through the pages quickly, you may click the wrong button because a prev button was added on the second page which is still under your mouse where you expect the next button to be. STAC Browser can't detect upfront which link types are supported by the API. UI elements should be placed in a way that users don't accidentially click the wrong button because the UI changed... So this is working as planned and actually designed with the E84 UX team. ;-) For the next link: If the limit is 12 and the result is 7, why can't you remove the next link? If there are 5 unfilled spots, you can clearly know that there's obviously not another page otherwise you'd have received more results. Nevertheless, the text will show "No further items available." now if an empty result has been recevied after the first page. |
I'm using version 3.2.0-beta.1 at https://radiantearth.github.io/stac-browser/
I made a search request returning 14 items:
Here's the request, although I doubt it's specific to this query: POST https://earth-search.aws.element84.com/v1/search with
{"datetime":"2024-03-04T20:00:00.000Z/2024-03-22T20:00:00.000Z","bbox":[13.171234130859377,53.81200414120256,13.274230957031252,53.85252660044951],"limit":12,"collections":["sentinel-2-c1-l2a"]}
Those 14 items are paginated into pages of 12 items each, so initially the previous/next buttons perfectly look like this:
But after clicking on "Next", the buttons stay the same:
So that I can't go back to the previous page. To reach there, I have to re-submit the search, which at least works.
But I can go forward again, leading to this state:
The text was updated successfully, but these errors were encountered: