you can add vendors while creating.

This commit is contained in:
BC
2018-06-14 21:17:07 -07:00
parent d110755939
commit a17b6b9688
11 changed files with 179 additions and 151 deletions

View File

@@ -68,12 +68,15 @@
keys (dissoc keys :field :subscription :event :spec)]
(into [dom keys] (with-keys rest))))
(defmethod do-bind "typeahead" [dom {:keys [field event subscription class spec] :as keys} & rest]
(defmethod do-bind "typeahead" [dom {:keys [field text-field event subscription class spec] :as keys} & rest]
(let [field (if (keyword? field) [field] field)
event (if (keyword? event) [event] event)
keys (assoc keys
:on-change (fn [selected]
(re-frame/dispatch (conj (conj event field) selected)))
:on-change (fn [selected text-description text-value]
(println "HERE " selected text-description text-value)
(re-frame/dispatch (conj (conj event field) selected))
(when text-field
(re-frame/dispatch (conj (conj event text-field) text-value))))
:value (get-in subscription field)
:class (str class
(when (and spec (not (s/valid? spec (get-in subscription field))))