problem with pagination when a number of items in result matches the display size (#89)

fixes #84
This commit is contained in:
Rok Garbas 2020-06-11 17:18:52 +02:00 committed by GitHub
parent cbec4ad027
commit 2983c00c74
Failed to generate hash of commit

View file

@ -482,12 +482,20 @@ viewPager outMsg model result path =
"#disabled" "#disabled"
else else
let
remainder =
if remainderBy model.size result.hits.total.value == 0 then
1
else
0
in
createUrl createUrl
path path
model.channel model.channel
model.query model.query
model.show model.show
((result.hits.total.value // model.size) * model.size) (((result.hits.total.value // model.size) - remainder) * model.size)
model.size model.size
] ]
[ text "Last" ] [ text "Last" ]