From 0a6f572b9ae12b57451af1bf2a8f902ed21eb141 Mon Sep 17 00:00:00 2001 From: Ian Bolton Date: Mon, 11 Mar 2024 17:08:19 -0400 Subject: [PATCH] :bug: Filter pre-existing selections from options Signed-off-by: Ian Bolton Signed-off-by: Ian Bolton --- client/src/app/components/Autocomplete.tsx | 7 ------- 1 file changed, 7 deletions(-) diff --git a/client/src/app/components/Autocomplete.tsx b/client/src/app/components/Autocomplete.tsx index d06dfd130d..9d49485eb4 100644 --- a/client/src/app/components/Autocomplete.tsx +++ b/client/src/app/components/Autocomplete.tsx @@ -80,12 +80,6 @@ export const Autocomplete: React.FC = ({ }, [options, selections]); const filteredOptions = useMemo(() => { - // No input so do not filter! - if (!inputValue) { - return options; - } - - // filter to choose options that are 1. NOT selected, and 2. include the inputValue return options.filter( ({ id, name }) => selections.findIndex((s) => s.id === id) === -1 && @@ -191,7 +185,6 @@ export const Autocomplete: React.FC = ({ if (!event || !itemId) { return; } - event.stopPropagation(); focusTextInput(true); addSelectionByItemId(itemId);