Closed dbsimmons64 closed 4 months ago
I believe the calculation for get page link range is incorrect.
I would expect that when I select page 18 I'd see 17,18,19.
Unable to select page 17 from pagination component.
Erlang/OTP 26 [erts-14.0.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit:ns] [dtrace]
Elixir 1.15.4 (compiled with Erlang/OTP 26)
I believe the get_page_link_range function is incorrect:
get_page_link_range
current_page + additional >= total_pages ->
should be:
current_page + additional > total_pages ->
Thanks for opening the issue, this should be fixed on main.
Great stuff - thanks for creating a fantastic library.
Summary
I believe the calculation for get page link range is incorrect.
Steps to reproduce
Expected behaviour
I would expect that when I select page 18 I'd see 17,18,19.
Actual behaviour
Unable to select page 17 from pagination component.
Elixir/Erlang version
Erlang/OTP 26 [erts-14.0.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit:ns] [dtrace]
Elixir 1.15.4 (compiled with Erlang/OTP 26)
Flop and Ecto versions
Additional context
I believe the
get_page_link_range
function is incorrect:should be: