Edge case with changed limit on second page
chdanielmueller opened this issue · comments
Daniel Müller commented
Hi there,
I hit an edge case where someone used a result limit of 5 items, navigated to page 2, changed the limit to 10 items and can not navigate backwards.
Current:
offset = 5, limit = 10
-> hasPrevPage = false, prevPage = null
Expected:
offset = 5, limit = 10
-> hasPrevPage = true, prevPage = 1
I have already written a test for this case and the solution.
PR follows shortly.
Cheers,
Daniel