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

EUIComboBox throws an error #1693

Closed
maryia-lapata opened this issue Mar 7, 2019 · 1 comment
Closed

EUIComboBox throws an error #1693

maryia-lapata opened this issue Mar 7, 2019 · 1 comment
Assignees
Labels

Comments

@maryia-lapata
Copy link
Contributor

If you focus EUIComboBox and try to search for a new value that is not in the options, then move focus out of the EUIComboBox, focus EUIComboBox again and click on Enter button, the issue appears in console.

mar-07-2019 17-23-03

Note:
It happens when this.state.activeOptionIndex equals -1 and hasActiveOption function returns true
https://github.com/elastic/eui/blob/master/src/components/combo_box/combo_box.js#L189

which causes calling onAddOption function with -1
https://github.com/elastic/eui/blob/master/src/components/combo_box/combo_box.js#L340

@timroes
Copy link
Contributor

timroes commented Mar 7, 2019

This currently blocks: elastic/kibana#31892

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

No branches or pull requests

4 participants