Allow to click to start searching

Search bar starts searching when *enter* is pressed and now
additionally using a button (which is more convenient on mobile).
This commit is contained in:
Eike Kettner
2020-10-29 22:48:21 +01:00
parent 5728be8b45
commit 2a53648c65

View File

@ -104,8 +104,8 @@ view model =
[ class "form"
, onSubmit SubmitSearch
]
[ div [ class "dropdown field is-active is-fullwidth" ]
[ div [ class "control has-icons-right is-fullwidth" ]
[ div [ class "dropdown field is-active is-fullwidth has-addons" ]
[ div [ class "control is-fullwidth" ]
[ input
[ class "input"
, type_ "text"
@ -114,7 +114,13 @@ view model =
, value model.searchInput
]
[]
, span [ class "icon is-right is-small" ]
]
, div [ class "control" ]
[ button
[ class "button is-primary"
, href "#"
, onClick SubmitSearch
]
[ img [ src "/icons/search-20.svg" ] []
]
]