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"
|
||||
|
||||
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" ]
|
||||
|
|
Loading…
Reference in a new issue