Merge branch 'master' into datomic
This commit is contained in:
@@ -18,9 +18,10 @@
|
||||
]
|
||||
(r/create-class
|
||||
{:reagent-render (fn [{:keys [matches on-change field text-field value class not-found-description]}]
|
||||
|
||||
(let [text @text
|
||||
valid-matches (take 5 (for [[[id t :as match] i] (map vector matches (range))
|
||||
:when (str/includes? (.toLowerCase t) (.toLowerCase text))]
|
||||
:when (str/includes? (or (some-> t .toLowerCase) "") (or (some-> text .toLowerCase) ""))]
|
||||
match))
|
||||
valid-matches (if (and not-found-description text)
|
||||
(concat valid-matches [[:not-found (not-found-description text) (not-found-value text)]])
|
||||
@@ -68,6 +69,7 @@
|
||||
false)
|
||||
true))
|
||||
:on-change (fn [e]
|
||||
(println valid-matches)
|
||||
(reset! highlighted (ffirst valid-matches))
|
||||
(select [nil (.. e -target -value)]))}
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user