camptocamp / mel-dataplatform

Source code for MEL's OpenData platform frontend
https://data.lillemetropole.fr/
GNU General Public License v3.0
2 stars 0 forks source link

[Search page] : Pagination #89

Closed cmoinier closed 3 months ago

cmoinier commented 3 months ago

Description

This PR adds a pagination component to the search page.

To test

With the local dump, you will need to decrease the pageSize in SearchResultsComponent to 2-3 in order to see the pagination work properly. It is set to 18 because the ticket asked for a display of 3x6 cards.

Angi-Kinas commented 3 months ago

@cmoinier thank you for the adaptions! Looking at the mockups, I just realised one more thing. When being on page 1, there is no "previous" button and I guess for the "next" button it is the same logic, when you are on the last page. I'm not sure if it is really important, since the buttons are disabled, but it would be closer to the mockup. I realized this, when having only one page: image

Also something I discovered (by mistake). If you only have one page, but in the url you use _page=2, it goes to the next empty page. Is that what we expect?