-
Notifications
You must be signed in to change notification settings - Fork 72
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
Enhance OuiComboBox - refine type to search error handling #95
Comments
If this is supposed to behave as a select box, it should always have one of its options always selected, which means that
|
@ashwin-pc good call out with # 2, I have updated the issue. Since its appropriate in some cases to clear the value, and other cases to fall back to the last valid selection, I have requested a prop to be added that would allow builders to configure the interaction. |
I thought , it allows us to select multiple options so default option won't be there. is it supposed to behave like "select" element in HTML ? There are different variant of Combo box, some allow us to add non existing option as custom option. so which one exactly we are talking about ? |
In the case of selecting multiples or a single (which is the use case for @ashwin-pc ) it is still weird when a value that is entered doesn't match anything. There is another implementation where if a string doesn't match a value, the user can create the value that way. I am not sure how the component is constructed, but I do think we need to touch up the interaction. |
According to @ashwin-pc a default value can be set already. Is this accurate ? |
Default value here, means initially we can set selectedOptions, but once user start entering anything right or wrong, that value will get overridden and we will have retain that . |
@kaddy645 I am not sure why we must retain that. Its leading to a poor user experience and is likely to increase errors. So, while this UI is correct while the focus is on the input box: |
Problem:
Currently, OuiComboBox offers a variation for single selection. A user can either open the selectable UI and scroll to select a value, or search within the combo box to find a match for their query, and can make a selection, and the selectable portion of combo box is dismissed, retaining the selected value in the search field.
However, if the entered search does not match any values, the user is presented with an error state, and the search box is not cleared when the combo box search results are closed, retaining the error state. This feels clunky and like "yelling at the user", and could be further refined.
Solution:
As a user is typing, it is valid to present an error state when no match is found. However, if no selection is made because no value was selected, when the focus is lost from the input box, the value should be cleared or returned to the last valid selection. Provide a prop to builders to set this interaction (clear or returned).
In addition, it is not immediately obvious that search can be performed in the combo box, and I propose adding a prop to allow
OuiIcon
to be turned on/off by the builder.Tasks:
The text was updated successfully, but these errors were encountered: