-
Notifications
You must be signed in to change notification settings - Fork 83
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
[combo-box] Entering invalid value should trigger invalid state upon blur #1150
Comments
Waits for vaadin/vaadin-combo-box#775 to be implemented first ( |
After giving this a bit more thought the proposed behavior would be at odds with the conceptual model of the combobox, which is that the typed value is primarily a filter for the list, from which a value still needs to be explicitly picked (unless the exact value of one of the items is typed, or custom values are enabled). By this model, typing a string that matches nothing into the field cannot be considered invalid input, as it is simply a filter. Even with the autoFocusFirstMatch behavior proposed in https://github.com/vaadin/vaadin-combo-box/issues/775, this conceptual model would still apply. |
The below workaround by @yuriy-fix might be useful for those interested in this issue (although not guaranteed to work correctly in all situations):
|
Related: #942 |
We've got complaints about that during validation UX testing recently too.
|
Description
If a value is entered into a combobox with no matching item (and new item entry not enabled), the entered value simply disappears when the field is blurred, instead of triggering the invalid state as it does in vaadin-date-picker.
Expected outcome
Combox invalid state is triggered.
Actual outcome
Invalid value simply disappears from the field.
Steps to reproduce
The text was updated successfully, but these errors were encountered: