mirror of
https://github.com/sp-tarkov/db-website.git
synced 2025-02-08 05:10:46 -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:
parent
945bc8eca1
commit
bfe942cfca
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user