Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefinied element on list #398

Open
Marcif opened this issue Feb 12, 2023 · 2 comments
Open

Undefinied element on list #398

Marcif opened this issue Feb 12, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@Marcif
Copy link

Marcif commented Feb 12, 2023

I'm having an issue with an undefined item in a drop-down list when I click on input.
Could you please help me

obraz

Source code on CodePen:
https://codepen.io/marcif/pen/WNKVBYL

@Marcif Marcif added the bug Something isn't working label Feb 12, 2023
@folknor
Copy link

folknor commented Feb 12, 2023

Works fine for me, both in Firefox and Chrome on Linux.

EDIT: I just opened your codepen and clicked the text input. Looks the same in both browsers.

nobug

@Marcif
Copy link
Author

Marcif commented Feb 12, 2023

I find solution.
Modify filter from this:

filter: (list) => { let filteredResults = Array.from( new Set(list.map((value) => value.match)) ).map((food) => { return list.find((value) => value.match === food); }); return filteredResults; }

to this:

filter: list => list.filter(item => item.key in item.value),

and now works fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants