Supports forcing vendor

This commit is contained in:
Bryce Covert
2020-05-11 19:21:48 -07:00
parent 8f66aac170
commit 55960888cf
5 changed files with 118 additions and 25 deletions

View File

@@ -120,7 +120,7 @@
valid-matches)]
valid-matches))
(defn typeahead-entity [{:keys [matches on-change field value class not-found-description
disabled not-found-value auto-focus]}]
disabled not-found-value auto-focus name]}]
(let [text (r/atom (or (second (first (filter #(= (first %) value) matches))) ""))
highlighted (r/atom nil)
]
@@ -153,6 +153,8 @@
[:div.control
[:div.tags.has-addons
[:span.tag text]
(when name
[:input {:type "hidden" :name name :value (:id @highlighted)}])
[:a.tag.is-delete {:on-click (fn []
(select nil)
(reset! text-atom nil)