You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[EuiComboBox] hasMatchingOptions arg in onSearchChange function appears to be a step behind when value switches from true to false (or vice versa) #6638
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.
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. 😅
I can confirm this bug is reproducible. It may be worth noting that it may automatically resolve if/when we change the internals of EuiComboBox to use EuiSelectable (#2841). However, an interim bugfix may also be preferable if the above meta takes a while to accomplish.
Activity
rahulbhadja commentedon Mar 13, 2023
@breehall looking into it.
cee-chen commentedon Mar 20, 2023
I can confirm this bug is reproducible. It may be worth noting that it may automatically resolve if/when we change the internals of
EuiComboBoxto useEuiSelectable(#2841). However, an interim bugfix may also be preferable if the above meta takes a while to accomplish.