Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
joeveiga opened this issue Aug 8, 2021 · 0 comments
Assignees

Comments

@joeveiga
Copy link

joeveiga commented Aug 8, 2021

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 }}
  <!-- ... -->
@Hypercubed Hypercubed self-assigned this Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants