ngx-ui
ngx-ui copied to clipboard
ngx-select does not show invalid style when used with Validators.required
Screenshot
Steps to reproduce
Add this snippet to the SelectPageComponent
demo page:
// ...
selectControl = new FormControl(['breach'], Validators.required);
// ...
And change the template to:
<!-- ... -->
<h4>Basic</h4>
<ngx-select [filterable]="false" [label]="'Attack Type'" [formControl]="selectControl" data-cy="attackType">
<ngx-select-option name="Breach" value="breach"></ngx-select-option>
<ngx-select-option name="DDOS" value="ddos"></ngx-select-option>
<ngx-select-option name="Physical" value="physical"></ngx-select-option>
</ngx-select>
Is valid: {{ selectControl.valid }}
<!-- ... -->