mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Add reset search form button
This commit is contained in:
@ -33,6 +33,7 @@ emptyModel =
|
||||
type Msg
|
||||
= Init
|
||||
| SearchMenuMsg Comp.SearchMenu.Msg
|
||||
| ResetSearch
|
||||
| ItemListMsg Comp.ItemList.Msg
|
||||
| ItemSearchResp (Result Http.Error ItemLightList)
|
||||
| DoSearch
|
||||
|
@ -21,6 +21,9 @@ update key flags msg model =
|
||||
]
|
||||
model
|
||||
|
||||
ResetSearch ->
|
||||
update key flags (SearchMenuMsg Comp.SearchMenu.ResetForm) model
|
||||
|
||||
SearchMenuMsg m ->
|
||||
let
|
||||
nextState =
|
||||
|
@ -20,6 +20,13 @@ view model =
|
||||
]
|
||||
, div [ class "right floated menu" ]
|
||||
[ a
|
||||
[ class "item"
|
||||
, onClick ResetSearch
|
||||
, href "#"
|
||||
]
|
||||
[ i [ class "undo icon" ] []
|
||||
]
|
||||
, a
|
||||
[ class "item"
|
||||
, onClick DoSearch
|
||||
, href ""
|
||||
|
Reference in New Issue
Block a user