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 forms modifes form status when any form directives used #55030

Closed
kbrilla opened this issue Mar 25, 2024 · 3 comments
Closed

Angular forms modifes form status when any form directives used #55030

kbrilla opened this issue Mar 25, 2024 · 3 comments

Comments

@kbrilla
Copy link

kbrilla commented Mar 25, 2024

Which @angular/* package(s) are the source of the bug?

forms

Is this a regression?

No

Description

When any of form directives like [formGroup], [formControl] etc.., are used then validity of forms is updated but no information of it is present as no events are executed.

using setTimeout to setError also works.

image

It is possible that attaching form directives caues validators to run and thus reseting errors but still I would expect to see status change event at least.

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/~/github.com/kbrilla/angualr-error-setErrors

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 17.3.1
Node: 18.18.0
Package Manager: npm 10.2.3
OS: linux x64

Angular: 17.3.1
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1703.1
@angular-devkit/build-angular   17.3.1
@angular-devkit/core            17.3.1
@angular-devkit/schematics      17.3.1
@schematics/angular             17.3.1
rxjs                            7.8.1
typescript                      5.3.3
zone.js                         0.14.4

Anything else?

No response

@pankajd24
Copy link

this.form.statusChanges method works when form status is changed. here form status is not changing even after onChange event. So you have to provide at least one validation in new FormControl(0,[ ]) , so that formControl and form validation state will be changed accordingly. then textBox change event will work

@ngbot ngbot bot added this to the needsTriage milestone Mar 27, 2024
@JeanMeche
Copy link
Member

Hi, this looks like a dupe of #41519.

@JeanMeche JeanMeche closed this as not planned Won't fix, can't repro, duplicate, stale Apr 8, 2024
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants