-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
feat: Add ion-radio-group compareWith property #18943
Comments
I second this, for Ionic v5 |
I also find this useful. I would like to try and implement it if the issue passes |
same requirement here. Binding value to objects does not work very well without a |
Hi folks, thanks for the feature request. Could you explain your use case for this? I know it's been a while since this was posted, so anyone feel free to chime in. |
The current implementation is based around strict equality (https://github.com/ionic-team/ionic-framework/blob/main/core/src/components/radio/radio.tsx#L128) This works fine for literals, but is problematic when dealing with object references. Often enough the list of selectable radio button values is fetched from an API (lets say an array of cities |
Thanks! I talked with the team, and we agree that this would be a useful feature to have. I'm also flagging this as One thing to note -- there is an open PR here #24687 that addresses a bug in |
This issue has been labeled as If you'd like to work on this issue, please comment here letting us know that you would like to submit a pull request for it. This helps us to keep track of the pull request and make sure there isn't duplicated effort. For a guide on how to create a pull request and test this project locally to see your changes, see our contributing documentation. Thank you! |
I just stumbled upon this during my Ionic 3 -> Ionic 6 migration nightmare. |
Thanks for the feature request! This has been implemented in #27452 and will be released in an upcoming version 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. |
Feature Request
Ionic version:
[x] 4.x
Describe the Feature Request
Support for using objects as values for
ion-radio
elements within anion-radio-group
and having the default value checked.Describe Preferred Solution
Add a
compareWith
property toion-radio-group
just like onion-select
.Additional Context
Is there a reason the select does support this and the radio group doesn't? It seems to me both are merely different UI solutions for a similar technical use-case (select one of a list of values).
The text was updated successfully, but these errors were encountered: