From bfe942cfcab81148f5e027c26edb410c87b45fed Mon Sep 17 00:00:00 2001 From: Terkoiz Date: Sat, 23 Sep 2023 14:18:03 +0000 Subject: [PATCH] Fixed issue where multiple items with the same name would always select the same ID (#4) Co-authored-by: Terkoiz Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/DB-Website/pulls/4 --- frontend/src/pages/mainPageComponents/SearchArea.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/mainPageComponents/SearchArea.tsx b/frontend/src/pages/mainPageComponents/SearchArea.tsx index f964dcd..d3744c4 100644 --- a/frontend/src/pages/mainPageComponents/SearchArea.tsx +++ b/frontend/src/pages/mainPageComponents/SearchArea.tsx @@ -179,7 +179,7 @@ export const SearchArea = () => { onChange={async (event: SyntheticEvent, newValue: IItemOption | null) => { if (newValue) { const selectedOption = selectOptions.find( - (elt) => elt.name === newValue.name, + (elt) => elt.id === newValue.id, ) if (selectedOption) await handleIDInput(selectedOption.id) }