-
Notifications
You must be signed in to change notification settings - Fork 27.5k
md-select not working properly with Angular 1.7.7 #16830
md-select not working properly with Angular 1.7.7 #16830
Comments
It works for me: Please provide a runnable demo, code and screenshots alone are not enough. |
The issue appears when you add an ng-if to the md-input-container. |
Correct, the issue does appear when you add an ng-if to the md-input-container or to a parent div as shown in this example. |
works in older version |
I'm working on a fix but in the mean time using NG-required=“true“ instead of plain required should work. |
Oddly enough using required="true" also works. |
…is surrounded by ngIf Closes angular#16830
Yes, that is because we considered the value of the required attribute for the requirement status. However the presence of required already means that the control is required. |
…unded by ngIf Closes angular#16830 Closes angular#16836
I'm submitting a ...
Current behavior:
Angular 1.7.7 results in a problem for the Angular Material md-select directive when the directive has the required attribute, has a parent with an ng-if, and the md-select's ng-model is given an initial value. The directive incorrectly flags a required error and the displayed select option shows a trailing asterisk.
Expected / new behavior:
The md-select should not flag a required error and the displayed selected option should not show an asterisk.
Minimal reproduction of the problem with instructions:
In Controller:
In View:
AngularJS version: 1.7.7
AngularJS Material version: 1.1.12
Browser: Chrome 71.0.3578.98 | Firefox 64.0.2 | Edge 42.17134.1.0
Anything else:
The text was updated successfully, but these errors were encountered: