Prevent adding empty filter items

This commit is contained in:
Saskia Lindner 2017-07-31 14:45:22 +02:00
parent 059ab97e85
commit c676186a35

View File

@ -119,7 +119,8 @@
(defn search-input [{:keys [title on-save on-stop]}]
(let [val (r/atom title)
save #(let [v (-> @val str str/trim)]
(on-save v))]
(when (pos? (count v))
(on-save v)))]
(fn []
[:input {:type "text"
:value @val