-
Notifications
You must be signed in to change notification settings - Fork 13.5k
bug: ion-radio does not keep checked-state after updating the underlaying object #29442
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
bug: ion-radio does not keep checked-state after updating the underlaying object #29442
Comments
Same for |
Thank you for the issue! I was able to replicate it and wrote up a fix for it. Feel free to test out the dev build:
|
…up (#29457) Issue number: resolves #29442 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> The state does not stay consistent when the data used to render the radios are updated. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - The state updates after the component loads, this allows the value to be set after the radio is rendered. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Dev build: 8.1.1-dev.11714760012.1eab947e --------- Co-authored-by: Sean Perkins <[email protected]>
Thanks for the issue! This has been resolved via PR #29457 and will be available in an upcoming release of Ionic. |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Prerequisites
Ionic Framework Version
v8.x
Current Behavior
Initially, the
ion-radio-button
is checked correctly. But after updating the objects that contain the data that is used to display the ion-radion-buttons, the checked-state gets lost, even though thevalue
property stays the same. Seems that this bug appears on Angular standalone projects.Perhaps this error could be related to the following issue: #29414
It could also be that this error can be found in other components, such as
ion-accordion
.Expected Behavior
The active ion-radio-button should be highlighted when it's value matches the value of it's containing ion-radio-group - as was the case before standalone components.
Steps to Reproduce
Code Reproduction URL
https://stackblitz.com/edit/angular-vquurr-ec7ark?file=src%2Fapp%2Fexample.component.html
Ionic Info
Ionic CLI : 7.2.0
Ionic Framework : @ionic/angular 8.0.1
@angular-devkit/build-angular : 17.3.6
@angular-devkit/schematics : 17.3.6
@angular/cli : 17.3.6
@ionic/angular-toolkit : 11.0.1
Additional Information
No response
The text was updated successfully, but these errors were encountered: