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
Error messages were not being removed on autocomplete fields, I'm not sure if this is better here or in the main angular-schema-form issue list, but I only noticed it on the md-autocomplete field.
Fixed by adding a method to the messages.js file for angular-schema-form and changing the ngModel watch to use it instead of update
varonce=scope.$watch('ngModel',function(ngModel){if(ngModel){// We also listen to changes of the model via parsers and formatters.// This is since both the error message can change and given a pristine// option to not show errors the ngModel.$error might not have changed// but we're not pristine any more so we should change!ngModel.$parsers.push(function(val){updateAsync(true);returnval;});ngModel.$formatters.push(function(val){updateAsync(true);returnval;});once();}});
The text was updated successfully, but these errors were encountered:
Repeating this process on a required field was creating duplicated error messages:
Fixed by changing
ng-if
tong-show
onng-messages
dummy element created bysfMessagesNodeHandler
.I believe the behavior is documented here by the angular team. angular/angular.js#7549 (comment)
Error messages were not being removed on autocomplete fields, I'm not sure if this is better here or in the main angular-schema-form issue list, but I only noticed it on the md-autocomplete field.
Fixed by adding a method to the messages.js file for angular-schema-form and changing the ngModel watch to use it instead of
update
...
The text was updated successfully, but these errors were encountered: