Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defn input-search []
- (let [value (re-frame/subscribe [:search-key])]
- (fn []
- [:form
- [:input {:name "search"
- :placeholder "Search"
- :type "search"
- :required ""
- :value @value
- :on-change #(re-frame/dispatch [:search-key (-> % .-target .-value)])}]
- [:button {
- :type "Submit"
- :class "btn btn__state--default"
- :on-click #(secretary/dispatch! (str "/search/?q=" @value))} "Submit"]])))
Add Comment
Please, Sign In to add comment