fix(radio-group): get radios before caching value to avoid infinite loop (#19448)

fixes #19277
This commit is contained in:
Liam DeBeasi
2019-09-25 13:06:17 -04:00
committed by GitHub
parent 446cf78e58
commit cf223e40c1

View File

@@ -83,8 +83,14 @@ export class RadioGroup implements ComponentInterface {
}
private async updateRadios() {
const { value } = this;
/**
* Make sure we get all radios first
* so values are up to date prior
* to caching the radio group value
*/
const radios = await this.getRadios();
const { value } = this;
let hasChecked = false;
// Walk the DOM in reverse order, since the last selected one wins!