Merge pull request #723 from status-im/bug/#695
Search input on Discover can leave header in indeterminate state (#695)
This commit is contained in:
commit
9d7c2867b6
|
@ -66,6 +66,8 @@
|
||||||
{:style st/toolbar-search-input
|
{:style st/toolbar-search-input
|
||||||
:auto-focus true
|
:auto-focus true
|
||||||
:placeholder search-placeholder
|
:placeholder search-placeholder
|
||||||
|
:return-key-type "search"
|
||||||
|
:on-blur #(dispatch [:set-in [:toolbar-search :show] nil])
|
||||||
:on-change-text #(dispatch [:set-in [:toolbar-search :text] %])
|
:on-change-text #(dispatch [:set-in [:toolbar-search :text] %])
|
||||||
:on-submit-editing #(toolbar-search-submit on-search-submit)}]
|
:on-submit-editing #(toolbar-search-submit on-search-submit)}]
|
||||||
[view
|
[view
|
||||||
|
@ -81,8 +83,7 @@
|
||||||
on-search-submit]
|
on-search-submit]
|
||||||
:as opts}]
|
:as opts}]
|
||||||
(let [toggle-search-fn #(dispatch [:set-in [:toolbar-search :show] %])
|
(let [toggle-search-fn #(dispatch [:set-in [:toolbar-search :show] %])
|
||||||
actions (if show-search?
|
actions (if-not show-search?
|
||||||
[(act/search #(toolbar-search-submit on-search-submit))]
|
|
||||||
(into actions [(act/search #(toggle-search-fn search-key))]))]
|
(into actions [(act/search #(toggle-search-fn search-key))]))]
|
||||||
[toolbar {:style (merge st/toolbar-with-search style)
|
[toolbar {:style (merge st/toolbar-with-search style)
|
||||||
:nav-action (if show-search?
|
:nav-action (if show-search?
|
||||||
|
|
Loading…
Reference in New Issue