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

Angular formControl ignored in ECheckbox #356

Open
qworin opened this issue Feb 26, 2021 · 0 comments
Open

Angular formControl ignored in ECheckbox #356

qworin opened this issue Feb 26, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@qworin
Copy link

qworin commented Feb 26, 2021

@Amil-Gaoul

Directive formControlName not working if placed in e-checkbox. The checkbox is changed visually unlike the value.

@Component({
  selector: 'app-form',
  template: `
    <form [formGroup]="fg">
      <e-checkbox formControlName="isActive">Is active</e-checkbox>
    </form>
  `,
})
export class FormComponent implements OnInit {
  public fg = new FormGroup({
    isActive: new FormControl(false, {updateOn: 'change'}),
  });

  ngOnInit() {
    this.fg.get('isActive').valueChanges.subscribe(console.log); // never outputs anything
  }
}
@Amil-Gaoul Amil-Gaoul added the bug Something isn't working label Mar 1, 2021
Darkcooder added a commit to Darkcooder/elephas-angular that referenced this issue Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants