ng-matero / extensions

Angular Material Extensions Library.
https://ng-matero.github.io/extensions/
MIT License
400 stars 50 forks source link

Mtx-Select: show required asterisk when using required validator #179

Closed nicolasstevenyates closed 1 year ago

nicolasstevenyates commented 1 year ago

Since Angular 13 Material Components show automatically an asterisk symbol next to the mat-label if the form control is required. Pre Angular 13 this was only displayed for template driven forms. Angular 13 added this functionality to reactive forms.

This is should also work on Mtx-select component when using a required Validator with Angular Reactive Forms.

These images show a matInput form Control and an mtx-select form control. As you can see the mtx-select form control is missing the * next to the label even it has the required validator.

image image

nzbin commented 1 year ago

15.0.3 has fixed this issue, please have a try.