problem with pagination when a number of items in result matches the display size (#89)
fixes #84
This commit is contained in:
parent
cbec4ad027
commit
2983c00c74
|
@ -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" ]
|
||||||
|
|
Loading…
Reference in a new issue