Hide Load-more button when there is no more

This commit is contained in:
Eike Kettner 2021-02-16 23:05:58 +01:00
parent 29d80adace
commit 33cfd6df6f

View File

@ -287,18 +287,19 @@ itemCardList flags settings model =
in in
[ Html.map ItemCardListMsg [ Html.map ItemCardListMsg
(Comp.ItemCardList.view2 itemViewCfg settings model.itemListModel) (Comp.ItemCardList.view2 itemViewCfg settings model.itemListModel)
, loadMore model , loadMore settings model
] ]
loadMore : Model -> Html Msg loadMore : UiSettings -> Model -> Html Msg
loadMore model = loadMore settings model =
let let
inactive = inactive =
not model.moreAvailable || model.moreInProgress || model.searchInProgress not model.moreAvailable || model.moreInProgress || model.searchInProgress
in in
div div
[ class "h-40 flex flex-col items-center justify-center w-full" [ class "h-40 flex flex-col items-center justify-center w-full"
, classList [ ( "hidden", resultsBelowLimit settings model ) ]
] ]
[ B.secondaryBasicButton [ B.secondaryBasicButton
{ label = { label =