Commit a99b4676 authored by Joachim Schunk's avatar Joachim Schunk

add readonly-option to input-text

parent 1e966eee
......@@ -24,7 +24,7 @@
(defn input-text
[{:keys [field-class input-class input-size label-icon
placeholder value on-change label icons expanded?
disabled tooltip autocomplete]}]
disabled tooltip autocomplete readonly?]}]
(let [id (gensym "input-text")]
(reagent/create-class
{:component-did-mount (fn []
......@@ -41,7 +41,7 @@
:reagent-render
(fn [{:keys [field-class input-class input-size label-icon
placeholder value on-change label icons expanded?
disabled tooltip autocomplete]}]
disabled tooltip autocomplete readonly?]}]
[:<> ;;:div.field {:class field-class}
#_(when label
[:label.label {:for id} label])
......@@ -54,6 +54,7 @@
:placeholder (or placeholder "")
:size input-size
:disabled disabled
:read-only readonly?
:on-change #(on-change (-> %
.-target
.-value))}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment