Skip to content

Commit 3d16dc7

Browse files
Tom Hernitlouisse
authored andcommitted
fix(form): add elements to Form Registrar Manager when connected
1 parent a4f9465 commit 3d16dc7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/field/src/FormRegistrarMixin.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,18 @@ export const FormRegistrarMixin = dedupeMixin(
2828
this.registrationReady = new Promise(resolve => {
2929
this.__resolveRegistrationReady = resolve;
3030
});
31-
formRegistrarManager.add(this);
3231

3332
this._onRequestToAddFormElement = this._onRequestToAddFormElement.bind(this);
3433
this.addEventListener('form-element-register', this._onRequestToAddFormElement);
3534
}
3635

36+
connectedCallback() {
37+
if (super.connectedCallback) {
38+
super.connectedCallback();
39+
}
40+
formRegistrarManager.add(this);
41+
}
42+
3743
disconnectedCallback() {
3844
if (super.disconnectedCallback) {
3945
super.disconnectedCallback();

0 commit comments

Comments
 (0)