From 7c98fe7d5148bda3e996749856f0490ba25170e1 Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Wed, 16 Jun 2021 16:02:50 -0700 Subject: [PATCH] adds up to 10 in the drop down. --- src/cljs/auto_ap/views/components/typeahead.cljs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cljs/auto_ap/views/components/typeahead.cljs b/src/cljs/auto_ap/views/components/typeahead.cljs index 05fd05b6..f44c60b9 100644 --- a/src/cljs/auto_ap/views/components/typeahead.cljs +++ b/src/cljs/auto_ap/views/components/typeahead.cljs @@ -28,14 +28,14 @@ :defaultHighlightedIndex 0 :defaultSelectedItem value :onInputValueChange (fn [input] - (if entities-by-id + (if entities-by-id (do (->> (.search entity-index (or (aget input "inputValue") "") #js {:fuzzy 0.2} ) clj->js (take 10) (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) ""))) entities)))))) :stateReducer state-reducer