mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-07-04 16:48:26 +00:00
Add a load-more button to item list
This commit is contained in:
@ -61,6 +61,7 @@ view model =
|
||||
, not model.menuCollapsed
|
||||
)
|
||||
, ( "sixteen wide column", model.menuCollapsed )
|
||||
, ( "item-card-list", True )
|
||||
]
|
||||
]
|
||||
[ div
|
||||
@ -90,6 +91,36 @@ view model =
|
||||
Detail ->
|
||||
div [] []
|
||||
]
|
||||
, div
|
||||
[ classList
|
||||
[ ( "sixteen wide column", True )
|
||||
]
|
||||
]
|
||||
[ div [ class "ui basic center aligned segment" ]
|
||||
[ button
|
||||
[ classList
|
||||
[ ( "ui basic tiny button", True )
|
||||
, ( "disabled", not model.moreAvailable )
|
||||
, ( "hidden invisible", resultsBelowLimit model )
|
||||
]
|
||||
, disabled (not model.moreAvailable || model.moreInProgress || model.searchInProgress)
|
||||
, title "Load more items"
|
||||
, href "#"
|
||||
, onClick LoadMore
|
||||
]
|
||||
[ if model.moreInProgress then
|
||||
i [ class "loading spinner icon" ] []
|
||||
|
||||
else
|
||||
i [ class "angle double down icon" ] []
|
||||
, if model.moreAvailable then
|
||||
text "Load more…"
|
||||
|
||||
else
|
||||
text "That's all"
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user