[EuiComboBox] hasMatchingOptions
arg in onSearchChange
function appears to be a step behind when value switches from true
to false
(or vice versa)
#6638
Labels
Issue
When using the
onSearchChange
prop with theEuiComboBox
component, the transition fromtrue
tofalse
(or vice versa) of thehasMatchingOptions
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
bee
in the combo box's input. Note in the console thathasMatchingOptions
istrue
forb
andbe
as expected, but it remainstrue
forbee
, where it should befalse
.r
in the combo box's input. Note in the console thathasMatchingOptions
value is now correctly set tofalse
.er
from the input so you're left withbe
.hasMatchingOptions
should betrue
again, but it's stillfalse
.Let me know if I can add any further clarity, I'm not sure I've described this very well. 😅
The text was updated successfully, but these errors were encountered: