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
{{ message }}
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
select: form remains valid in a required md-select when empty option is selected #10005
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.
changed the title [-]mdSelect: form remains valid after deselect a required md-select with empty option [/-][+]select: form remains valid in a required md-select when empty option is selected[/+]on Aug 26, 2019
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.
Activity
topherfangio commentedon Nov 12, 2016
I don't think I am understanding your use-case. If the field is required, you shouldn't have any empty option right?
dephiros commentedon Nov 13, 2016
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
topherfangio commentedon Nov 13, 2016
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.[-]mdSelect: form remains valid after deselect a required md-select with empty option [/-][+]select: form remains valid in a required md-select when empty option is selected[/+]Splaktar commentedon Aug 26, 2019
This updated CodePen demonstrates how this is still an issue in
1.1.20in addition to providing a side-by-side comparison to a regularselectwith 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
fix(select): form remains valid after empty option is selected
fix(select): form remains valid after empty option is selected