Actual Behavior:
What is the issue? *What is the expected behavior?CodePen (or steps to reproduce the issue): *
CodePen Demo which shows your issue: http://codepen.io/dephiros/pen/ObMqBY?editors=1000Details: Angular Versions: *
Angular Version: 1.5.5Angular Material Version: 1.1.1Additional Information:
Browser Type: * chromeBrowser Version: * latestOS: * macOSStack Traces:I don't think I am understanding your use-case. If the field is required, you shouldn't have any empty option right?
The requirement that I have designing the form is all select should have the an empty option to clear the select after user selecting a valid value. We just use this as the standard select across everywhere in the application regardless if the field is required or not
I guess if you're attempting to use these together, it does seem like the md-option-empty should indeed reset the validity of the model. However, I'll leave this to @ThomasBurleson's judgement as to whether or not this should be considered a bug.
This updated CodePen demonstrates how this is still an issue in 1.1.20 in addition to providing a side-by-side comparison to a regular select with AngularJS. This certainly seems like a bug that needs to be fixed.
Reference: https://stackoverflow.com/questions/12654631/why-does-angularjs-include-an-empty-option-in-select
Most helpful comment
I guess if you're attempting to use these together, it does seem like the
md-option-emptyshould indeed reset the validity of the model. However, I'll leave this to @ThomasBurleson's judgement as to whether or not this should be considered a bug.