adds up to 10 in the drop down.
This commit is contained in:
@@ -28,14 +28,14 @@
|
|||||||
:defaultHighlightedIndex 0
|
:defaultHighlightedIndex 0
|
||||||
:defaultSelectedItem value
|
:defaultSelectedItem value
|
||||||
:onInputValueChange (fn [input]
|
:onInputValueChange (fn [input]
|
||||||
(if entities-by-id
|
(if entities-by-id
|
||||||
(do
|
(do
|
||||||
(->> (.search entity-index (or (aget input "inputValue") "") #js {:fuzzy 0.2} )
|
(->> (.search entity-index (or (aget input "inputValue") "") #js {:fuzzy 0.2} )
|
||||||
clj->js
|
clj->js
|
||||||
(take 10)
|
(take 10)
|
||||||
(set-items)))
|
(set-items)))
|
||||||
|
|
||||||
(set-items (map clj->js (take 5 (filter (fn [x] (str/includes? (or (some-> (entity->text x) str/lower-case) "")
|
(set-items (map clj->js (take 10 (filter (fn [x] (str/includes? (or (some-> (entity->text x) str/lower-case) "")
|
||||||
(or (some-> (aget input "inputValue") str/lower-case) "")))
|
(or (some-> (aget input "inputValue") str/lower-case) "")))
|
||||||
entities))))))
|
entities))))))
|
||||||
:stateReducer state-reducer
|
:stateReducer state-reducer
|
||||||
|
|||||||
Reference in New Issue
Block a user