Merge pull request #804 from Hzunax/fix/fieldset-set-all-values
fix(formgroup): wait for formElements to register
This commit is contained in:
commit
68a7cc3d9d
1 changed files with 4 additions and 1 deletions
|
|
@ -269,7 +269,10 @@ export const FormGroupMixin = dedupeMixin(
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
_setValueForAllFormElements(property, value) {
|
async _setValueForAllFormElements(property, value) {
|
||||||
|
if (!this.__readyForRegistration) {
|
||||||
|
await this.registrationReady;
|
||||||
|
}
|
||||||
this.formElements.forEach(el => {
|
this.formElements.forEach(el => {
|
||||||
el[property] = value; // eslint-disable-line no-param-reassign
|
el[property] = value; // eslint-disable-line no-param-reassign
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue