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
For the country selector in the cloud console, the component ComboBox was used.
This had a feature where beginning to type the name of a country would select the first matching option.
In order to achieve this, the parameters passed to ComboBox's onSearchChange prop were altered from (searchValue: string, hasMatchingOptions?: boolean) => void
to (searchValue: string, hasMatchingOptions?: boolean, matchingOptions?: EuiComboBoxOptionOption<T>[]) => void
and an onSearchChange function was developed to manually select the first option of the array matchingOptions whenever the searchValue changed.
Proposed solutions
Add an autocomplete prop
This functionality could come by default from the component itself. Setting autocomplete to true would automatically select the first matching option.
Restore the matchingOptions parameter
Since onSearchChange only shows whether there was a match but not which results matched, adding this parameter to the function would allow for custom behaviors such as the autocomplete
The text was updated successfully, but these errors were encountered:
Description
For the country selector in the cloud console, the component
ComboBox
was used.This had a feature where beginning to type the name of a country would select the first matching option.
In order to achieve this, the parameters passed to
ComboBox'
sonSearchChange
prop were altered from(searchValue: string, hasMatchingOptions?: boolean) => void
to
(searchValue: string, hasMatchingOptions?: boolean, matchingOptions?: EuiComboBoxOptionOption<T>[]) => void
and an onSearchChange function was developed to manually select the first option of the array
matchingOptions
whenever thesearchValue
changed.Proposed solutions
Add an
autocomplete
propThis functionality could come by default from the component itself. Setting autocomplete to true would automatically select the first matching option.
Restore the
matchingOptions
parameterSince onSearchChange only shows whether there was a match but not which results matched, adding this parameter to the function would allow for custom behaviors such as the autocomplete
The text was updated successfully, but these errors were encountered: