0
0
mirror of https://github.com/sp-tarkov/db-website.git synced 2025-02-02 17:49:21 -05:00

Fixed issue where multiple items with the same name would always select the same ID (#4)

Co-authored-by: Terkoiz <terkoiz@spt.dev>
Reviewed-on: SPT-AKI/DB-Website#4
This commit is contained in:
Terkoiz 2023-09-23 14:18:03 +00:00
parent 945bc8eca1
commit bfe942cfca

View File

@ -179,7 +179,7 @@ export const SearchArea = () => {
onChange={async (event: SyntheticEvent, newValue: IItemOption | null) => { onChange={async (event: SyntheticEvent, newValue: IItemOption | null) => {
if (newValue) { if (newValue) {
const selectedOption = selectOptions.find( const selectedOption = selectOptions.find(
(elt) => elt.name === newValue.name, (elt) => elt.id === newValue.id,
) )
if (selectedOption) await handleIDInput(selectedOption.id) if (selectedOption) await handleIDInput(selectedOption.id)
} }