Skip to content

Commit

Permalink
problem with pagination when a number of items in result matches the …
Browse files Browse the repository at this point in the history
…display size

fixes #84
  • Loading branch information
garbas committed Jun 11, 2020
1 parent 007eee1 commit aad1670
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Search.elm
Expand Up @@ -482,12 +482,20 @@ viewPager outMsg model result path =
"#disabled"

else
let
remainder =
if remainderBy model.size result.hits.total.value == 0 then
1

else
0
in
createUrl
path
model.channel
model.query
model.show
((result.hits.total.value // model.size) * model.size)
(((result.hits.total.value // model.size) - remainder) * model.size)
model.size
]
[ text "Last" ]
Expand Down

0 comments on commit aad1670

Please sign in to comment.