Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(upgrade): fixes downgrade issue for signal based inputs #56837

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
wants to merge 1 commit into from
Closed

fix(upgrade): fixes downgrade issue for signal based inputs #56837

wants to merge 1 commit into from

Conversation

rush1818
Copy link

@rush1818 rush1818 commented Jul 3, 2024

Fix issue where setting inputs did not work if the component used signal based inputs resulting in errors.

Switching to setInput API will correctly set the inputs.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Signal based inputs get the raw value instead of the signal function causing not a function error.

Issue Number: N/A

What is the new behavior?

Using setInput correctly sets the input on the component. If the input is signal based then it wraps the value in the signal prior to setting it in the component.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Fix issue where setting inputs did not work if the component used signal based inputs resulting in errors.

Switching to `setInput` API will correctly set the inputs.
@pullapprove pullapprove bot requested a review from alxhub July 3, 2024 23:09
@angular-robot angular-robot bot added the area: upgrade Issues related to AngularJS → Angular upgrade APIs label Jul 3, 2024
@ngbot ngbot bot added this to the Backlog milestone Jul 3, 2024
@pkozlowski-opensource
Copy link
Member

Thnx for the PR @rush1818 - the fix goes in the right direction but the final one needs to handle more cases, requires tests and some other refactorings - we actually do have a work in progress here: #56728

Going to close this as a duplicate of #56728

@pkozlowski-opensource
Copy link
Member

Oh wait, actually, this is about update, not elements 🤦

Re-opening. This PR would require tests to land, though.

@pkozlowski-opensource pkozlowski-opensource added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Jul 4, 2024
@rush1818
Copy link
Author

rush1818 commented Jul 4, 2024

Took a look and turns out this may require more changes than anticipated. Closing this PR and will file a bug.

@rush1818 rush1818 closed this Jul 4, 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 Aug 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews area: upgrade Issues related to AngularJS → Angular upgrade APIs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants