You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using paging, the first and prev links are not rendered on the second page.
Example:
First page is at URL /api/books (A), which contains a link to next page: /api/books/?page[number]=1 (B). That page contains a link to its next page: /api/books/?page[number]=2 (C).
Observed behavior:
Page C contains top-level links for first and prev, but they are missing on page B.
Expected behavior:
I think the correct behavior would be for first and prev to exist also on page B, because it is the second page.
I traced this down to LinkBuilder.SetPageLinks(...), which conditionally sets them:
I think the condition should be changed to > 0, as index 0 appears to be the first page.
Note that the index is 1-based, which means that the value for Next was also generated wrongly: it displayed page number 1 under Next when having request the first page.
#625 fixes this, and will release a new alpha version by the end of today. Thanks for reporting!
Description
When using paging, the
first
andprev
links are not rendered on the second page.Example:
First page is at URL /api/books (A), which contains a link to next page: /api/books/?page[number]=1 (B). That page contains a link to its next page: /api/books/?page[number]=2 (C).
Observed behavior:
Page C contains top-level links for
first
andprev
, but they are missing on page B.Expected behavior:
I think the correct behavior would be for
first
andprev
to exist also on page B, because it is the second page.I traced this down to
LinkBuilder.SetPageLinks(...)
, which conditionally sets them:I think the condition should be changed to > 0, as index 0 appears to be the first page.
Environment
latest version of Develop branch
The text was updated successfully, but these errors were encountered: