mirror of
https://github.com/status-im/re-frame-10x.git
synced 2025-01-13 07:34:54 +00:00
Prevent adding empty filter items
This commit is contained in:
parent
059ab97e85
commit
c676186a35
@ -119,7 +119,8 @@
|
|||||||
(defn search-input [{:keys [title on-save on-stop]}]
|
(defn search-input [{:keys [title on-save on-stop]}]
|
||||||
(let [val (r/atom title)
|
(let [val (r/atom title)
|
||||||
save #(let [v (-> @val str str/trim)]
|
save #(let [v (-> @val str str/trim)]
|
||||||
(on-save v))]
|
(when (pos? (count v))
|
||||||
|
(on-save v)))]
|
||||||
(fn []
|
(fn []
|
||||||
[:input {:type "text"
|
[:input {:type "text"
|
||||||
:value @val
|
:value @val
|
||||||
|
Loading…
x
Reference in New Issue
Block a user