Skip to content

Commit cf223e4

Browse files
authored
fix(radio-group): get radios before caching value to avoid infinite loop (ionic-team#19448)
fixes ionic-team#19277
1 parent 446cf78 commit cf223e4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

core/src/components/radio-group/radio-group.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,14 @@ export class RadioGroup implements ComponentInterface {
8383
}
8484

8585
private async updateRadios() {
86-
const { value } = this;
86+
/**
87+
* Make sure we get all radios first
88+
* so values are up to date prior
89+
* to caching the radio group value
90+
*/
8791
const radios = await this.getRadios();
92+
const { value } = this;
93+
8894
let hasChecked = false;
8995

9096
// Walk the DOM in reverse order, since the last selected one wins!

0 commit comments

Comments
 (0)