make pagination reset to zero when the rows change

This commit is contained in:
Andrew Martin 2017-10-26 12:31:07 -04:00
parent 0427fd82e2
commit c01dce8eb2

View File

@ -826,7 +826,7 @@ semUiFixedPagination maxPageCount extraClass pageCount = do
(fwdEl,()) <- elClass' "a" "icon item" $ do
elClass "i" "right chevron icon" (return ())
let fwd = Forward <$ domEvent Click fwdEl
let moveEv = leftmost (fwd : bck : posList)
let moveEv = leftmost (fwd : bck : (Position 0 <$ updated pageCount) : posList)
page <- foldDynM (\move oldPage -> case move of
Backward -> return (max 0 (oldPage - 1))
Forward -> do