let _value = key === "HiringPath" ? name : val;
Here, you're assigning the radio button's name (which is likely the same for all options, like "HiringPath"
) instead of the selected value. This causes unexpected behavior in setState
.
let _value = val;
This ensures only the clicked radio button's value is set properly.