Skip to content
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]: The <MenuItemRadioGroup> component fires the onChange callback function twice #17736

Closed
2 tasks done
AbrahamLara opened this issue Oct 14, 2024 · 0 comments · Fixed by #17754
Closed
2 tasks done
Assignees
Labels

Comments

@AbrahamLara
Copy link

AbrahamLara commented Oct 14, 2024

Package

@carbon/react

Browser

Chrome

Package version

1.65.0

React version

No response

Description

When an item is selected from the component, it fires the onChange callback function twice. The data returned from the onChange callback returns a onClick event object and then the item that was selected.

Reproduction/example

https://stackblitz.com/edit/github-cmfaqv-vacov7?file=src%2FApp.jsx

Steps to reproduce

Select an item from the submenu.

Suggested Severity

Severity 3 = User can complete task, and/or has a workaround within the user experience of a given component.

Application/PAL

No response

Code of Conduct

@alisonjoseph alisonjoseph moved this to ⏱ Backlog in Design System Oct 14, 2024
@alisonjoseph alisonjoseph added severity: 2 https://ibm.biz/carbon-severity and removed status: needs triage 🕵️‍♀️ labels Oct 14, 2024
@guidari guidari self-assigned this Oct 14, 2024
@github-project-automation github-project-automation bot moved this from ⏱ Backlog to ✅ Done in Design System Oct 17, 2024
AlanGreene added a commit to AlanGreene/carbon-design-system that referenced this issue Nov 5, 2024
This is the same issue and fix that was previously addressed for
`MenuItemRadioGroup` in carbon-design-system#17736.

Also added a test to cover this case, including checking the value
passed to the `onChange` prop as the redundant `onChange` being
removed here was passing the SyntheticEvent instead of the expected
boolean.
AlanGreene added a commit to AlanGreene/carbon-design-system that referenced this issue Nov 5, 2024
This is the same issue and fix that was previously addressed for
`MenuItemRadioGroup` in carbon-design-system#17736.

Also added a test to cover this case, including checking the value
passed to the `onChange` prop as the redundant `onChange` being
removed here was passing the SyntheticEvent instead of the expected
boolean.
github-merge-queue bot pushed a commit that referenced this issue Nov 11, 2024
This is the same issue and fix that was previously addressed for
`MenuItemRadioGroup` in #17736.

Also added a test to cover this case, including checking the value
passed to the `onChange` prop as the redundant `onChange` being
removed here was passing the SyntheticEvent instead of the expected
boolean.

Co-authored-by: Nikhil Tomar <[email protected]>
Co-authored-by: Anna Wen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants