Issue
When using the onSearchChange prop with the EuiComboBox component, the transition from true to false (or vice versa) of the hasMatchingOptions argument appears to be a step behind.
Expected behavior
The value of hasMatchingOptions should immediately reflect whether or not the entered value matches any of the combo box options.
To reproduce
- Visit https://codesandbox.io/s/smoosh-fast-oo7upo?file=/demo.js
- Expand the console
- Type
bee in the combo box's input. Note in the console that hasMatchingOptions is true for b and be as expected, but it remains true for bee, where it should be false.
- Type
r in the combo box's input. Note in the console that hasMatchingOptions value is now correctly set to false.
- Delete
er from the input so you're left with be. hasMatchingOptions should be true again, but it's still false.
Let me know if I can add any further clarity, I'm not sure I've described this very well. 😅
Issue
When using the
onSearchChangeprop with theEuiComboBoxcomponent, the transition fromtruetofalse(or vice versa) of thehasMatchingOptionsargument appears to be a step behind.Expected behavior
The value of
hasMatchingOptionsshould immediately reflect whether or not the entered value matches any of the combo box options.To reproduce
beein the combo box's input. Note in the console thathasMatchingOptionsistrueforbandbeas expected, but it remainstrueforbee, where it should befalse.rin the combo box's input. Note in the console thathasMatchingOptionsvalue is now correctly set tofalse.erfrom the input so you're left withbe.hasMatchingOptionsshould betrueagain, but it's stillfalse.Let me know if I can add any further clarity, I'm not sure I've described this very well. 😅