Skip to content

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

Closed
rush1818 wants to merge 1 commit into
angular:mainfrom
rush1818:signal-fix
Closed

rush1818 wants to merge 1 commit into
angular:mainfrom
rush1818:signal-fix

Conversation

@rush1818

@rush1818 rush1818 commented Jul 3, 2024

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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

rush1818 commented Jul 4, 2024

Copy link
Copy Markdown
Author

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
Copy Markdown

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