ngx-ui icon indicating copy to clipboard operation
ngx-ui copied to clipboard

ngx-select does not show invalid style when used with Validators.required

Open joeveiga opened this issue 3 years ago • 0 comments

Screenshot

Kapture 2021-08-07 at 23 43 59

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 }}
  <!-- ... -->

joeveiga avatar Aug 08 '21 03:08 joeveiga