@transferwise/components 0.0.0-experimental-5ea6623 → 0.0.0-experimental-892d236
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.esm.js
CHANGED
|
@@ -10027,9 +10027,7 @@ function RadioGroup({
|
|
|
10027
10027
|
selectedValue: controlledValue,
|
|
10028
10028
|
onChange
|
|
10029
10029
|
}) {
|
|
10030
|
-
const [
|
|
10031
|
-
const [uncontrolledValue, setUncontrolledValue] = useState();
|
|
10032
|
-
const selectedValue = controlled ? controlledValue : uncontrolledValue;
|
|
10030
|
+
const [uncontrolledValue, setUncontrolledValue] = useState(controlledValue);
|
|
10033
10031
|
return radios.length > 0 ? /*#__PURE__*/jsx("div", {
|
|
10034
10032
|
role: "radiogroup",
|
|
10035
10033
|
children: radios.map(({
|
|
@@ -10041,11 +10039,9 @@ function RadioGroup({
|
|
|
10041
10039
|
...restProps,
|
|
10042
10040
|
name: name,
|
|
10043
10041
|
value: value,
|
|
10044
|
-
checked: value ===
|
|
10042
|
+
checked: value === uncontrolledValue,
|
|
10045
10043
|
onChange: nextValue => {
|
|
10046
|
-
|
|
10047
|
-
setUncontrolledValue(nextValue);
|
|
10048
|
-
}
|
|
10044
|
+
setUncontrolledValue(nextValue);
|
|
10049
10045
|
onChange(nextValue);
|
|
10050
10046
|
}
|
|
10051
10047
|
}, index))
|