You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
melloware
added
Type: Bug
Issue contains a defect related to a specific component.
and removed
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
labels
Mar 25, 2024
Describe the bug
OnChange on RadioButton component event is being triggered twice, and I see that logic in RadioButton.js here https://github.com/primefaces/primereact/blob/master/components/lib/radiobutton/RadioButton.js#L60 and https://github.com/primefaces/primereact/blob/master/components/lib/radiobutton/RadioButton.js#L68 it's being called twice
We should only trigger onChange only once.
Reproducer
https://stackblitz.com/edit/ugdbqe?file=src%2FApp.jsx
PrimeReact version
10.5.3
React version
17.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
Any
Steps to reproduce the behavior
Click on the checkbox above, you should see TWO alerts on change.
Expected behavior
It should only show alert once on change of radio button.
The text was updated successfully, but these errors were encountered: