Skip to content

Instantly share code, notes, and snippets.

@verma
Created March 12, 2015 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save verma/9cd78d2c8e817f2b7a66 to your computer and use it in GitHub Desktop.
Save verma/9cd78d2c8e817f2b7a66 to your computer and use it in GitHub Desktop.
(defn- -single-line-input [value on-key placeholder]
(fn [value on-key placeholder]
[:input.form-control.input-lg {:type "text"
:value @value
:on-key-down on-key
:on-change #(reset! value (.. % -target -value))
:placeholder placeholder
:autoFocus true}]))
(defn- single-line-input [value on-key placeholder]
(with-meta
[-single-line-input value on-key placeholder]
{:component-did-mount
(fn [this]
(println "MOUNTED!!!!!!!!!!!!!!!!!!"))}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment