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

Option not selectable can still be selected via search & enter key #1419

Closed
schen-10x opened this issue May 4, 2021 · 4 comments · Fixed by #1529
Closed

Option not selectable can still be selected via search & enter key #1419

schen-10x opened this issue May 4, 2021 · 4 comments · Fixed by #1529
Labels

Comments

@schen-10x
Copy link

Describe the bug
An option that is not selectable can still be selected via search and press the enter key.

Additional context
Upon debugging the typeAheadPonter.js, the typeAheadPointer is first initialized to -1, but after that, it's always set to 0, never reset back to -1. And thus in the typeAheadSelect(), the typeAheadOption will be the the matching filtered option, even if it's not selectable.
Suggest changing line 56: if (typeAheadOption) ---> if (typeAheadOption && this.selectable(typeAheadOption))

@viperet
Copy link

viperet commented May 18, 2021

@schen-10x can confirm this bug, it only reproducible with the last item in the list for me. Thanks a lot for the suggested fix!

@avandrevitor
Copy link

I'm having the same problem, any idea how to solve it?

@schen-10x
Copy link
Author

schen-10x commented Sep 14, 2021 via email

@github-actions
Copy link

🎉 This issue has been resolved in version 3.18.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants