Closed
Description
Bug, feature request, or proposal:
In my opinion bug with mat-select
. The error message is not visible when dropdown is closed; focus is not behaving properly with "required" attribute applied.
What is the expected behavior?
When focus is not on the control anymore, the error message should be visible.
What is the current behavior?
When focus is lost, the error message is not immediately visible.
What are the steps to reproduce?
- http://plnkr.co/edit/K6hyF9?p=preview
- Click on "favorite options" on the left hand side
- Click out of dropdown to cancel the selection
- Notice the visible "this field is required message"
- Click on "favorite food"
- click out of dropdown to cancel the selection
- notice that "this field is required" is not visible + the bottom line thickness is a little bit bigger than standard
- click again outside of the control, to remove focus on the control
- the "this field is required" message is visible now
What is the use-case or motivation for changing an existing behavior?
As on the plunker shown, autocomplete is behaving move intuitevly when deselecting / closing the dropdown. Validation occurs immediatelly as you would expect it. With mat-select it's not. In order to kick off the validation, you need to click twice somewhere on the form (some sort).
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
material: 5.0.0-rc.1-6a9fbfe
angular: as for version above
OS: win 10 64bit enterprise
browser: all
Is there anything else we should know?
nope, keep up the good work over this repository :)