From 0aaf6ce77fc891536a86a58c9f5b88a3fbf48e4c Mon Sep 17 00:00:00 2001 From: Daniel Compton Date: Thu, 15 Dec 2016 10:52:09 +1300 Subject: [PATCH] Don't pass on-save as props to input field. Fixes #8 --- src/day8/re_frame/trace.cljs | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/day8/re_frame/trace.cljs b/src/day8/re_frame/trace.cljs index 4d7ea3b..3b10425 100644 --- a/src/day8/re_frame/trace.cljs +++ b/src/day8/re_frame/trace.cljs @@ -113,17 +113,16 @@ (defn search-input [{:keys [title on-save on-stop]}] (let [val (r/atom title) save #(let [v (-> @val str clojure.string/trim)] - (on-save v))] - (fn [props] - [:input (merge props - {:type "text" - :value @val - :auto-focus true - :on-blur save - :on-change #(reset! val (-> % .-target .-value)) - :on-key-down #(case (.-which %) - 13 (save) - nil)})]))) + (on-save v))] + (fn [] + [:input {:type "text" + :value @val + :auto-focus true + :on-blur save + :on-change #(reset! val (-> % .-target .-value)) + :on-key-down #(case (.-which %) + 13 (save) + nil)}]))) (defn render-traces []