Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix(forms): Don't send updates for identical input values #55761

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

Closed

Conversation

JeanMeche
Copy link
Member

In case an input event sends the same value to our forms, we will discard the update and consider the input hasn't change. This will prevent having duplicate values on the valueChanges event.

Fixes #43228

Note: Seing how this change broke our tests, I have low confidence we'll be able to merge it.

@JeanMeche JeanMeche marked this pull request as ready for review May 11, 2024 16:57
@pullapprove pullapprove bot requested a review from dylhunn May 11, 2024 16:57
@JeanMeche JeanMeche changed the title fix(forms): Don't send updates for same value fix(forms): Don't send updates for identical input values May 11, 2024
@JeanMeche JeanMeche force-pushed the forms/input-duplicate-values branch 3 times, most recently from 0db415b to efada8d Compare May 11, 2024 17:08
In case an input event sends the same value to our forms, we will discard the update and consider the input hasn't change. This will prevent having duplicate values on the valueChanges event.

Fixes angular#43228
@JeanMeche JeanMeche force-pushed the forms/input-duplicate-values branch from efada8d to 2c6cd7e Compare May 11, 2024 19:32
@ngbot ngbot bot added this to the Backlog milestone May 16, 2024
@JeanMeche JeanMeche added the target: major This PR is targeted for the next major release label Jul 26, 2024
@alxhub alxhub added the requires: TGP This PR requires a passing TGP before merging is allowed label Oct 17, 2024
@alxhub alxhub requested review from alxhub and removed request for dylhunn October 17, 2024 14:21
@pullapprove pullapprove bot removed the requires: TGP This PR requires a passing TGP before merging is allowed label Oct 17, 2024
Copy link
Member

@alxhub alxhub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code-wise this LGTM. It will definitely require a TGP though, and I could see it being quite breaking.

@alxhub alxhub self-assigned this Oct 17, 2024
@alxhub
Copy link
Member

alxhub commented Oct 22, 2024

In TGP (train): OCL:688303046:BASE:688537051:1729617073387:be2fcd5

@alxhub
Copy link
Member

alxhub commented Oct 23, 2024

As expected, TGP revealed some breakages, though less than expected. The errors seem to indicate patterns where identical (===) objects are passed but have deep mutations.

Dropping this from v19 for now and will follow up with @JeanMeche.

@JeanMeche
Copy link
Member Author

I'll close it as this is probably too breaking.

@JeanMeche JeanMeche closed this Mar 5, 2025
@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 Apr 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: forms breaking changes target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Angular form field having max length reached makes a call to form.valuechanges() when we try to append a string by pasting something in it.
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.