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

pristine$ not working #57

Open
Xample opened this issue Aug 8, 2022 · 0 comments
Open

pristine$ not working #57

Xample opened this issue Aug 8, 2022 · 0 comments

Comments

@Xample
Copy link

Xample commented Aug 8, 2022

Hello, let's consider the following code:

public aController : FormControl<AType> = new FormControl<AType>(null);
public onSetPristine(){ this.aController.markAsPristine();}

then within the html

<input [formControl]="aController">
<button (click)=onSetPristine()>Set pristine</button>
{{aController.pristine$|async}}

Initially, aController.pristine$ is true, when I change the controller it becomes false as expected. But when I mark the controller as pristine (click on "Set pristine") aController.pristine$ stays false. The regular non observable aController.pristine goes however back to true.

In short: aController.pristine$ is broken somewhere. The same applies to dirty$

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

1 participant