fix(select-rich): instantiation after first update
This commit is contained in:
parent
c2b7766492
commit
184898c111
2 changed files with 3 additions and 9 deletions
|
|
@ -32,7 +32,6 @@ export const FormRegistrarPortalMixin = dedupeMixin(
|
||||||
if (super.connectedCallback) {
|
if (super.connectedCallback) {
|
||||||
super.connectedCallback();
|
super.connectedCallback();
|
||||||
}
|
}
|
||||||
this.__checkRegistrationTarget();
|
|
||||||
|
|
||||||
formRegistrarManager.add(this);
|
formRegistrarManager.add(this);
|
||||||
if (this.__hasBeenRendered) {
|
if (this.__hasBeenRendered) {
|
||||||
|
|
@ -66,6 +65,7 @@ export const FormRegistrarPortalMixin = dedupeMixin(
|
||||||
}
|
}
|
||||||
|
|
||||||
firstUpdated(changedProperties) {
|
firstUpdated(changedProperties) {
|
||||||
|
this.__checkRegistrationTarget();
|
||||||
super.firstUpdated(changedProperties);
|
super.firstUpdated(changedProperties);
|
||||||
this.__resolveRegistrationReady();
|
this.__resolveRegistrationReady();
|
||||||
this.__readyForRegistration = true;
|
this.__readyForRegistration = true;
|
||||||
|
|
|
||||||
|
|
@ -203,17 +203,9 @@ export class LionSelectRich extends ScopedElementsMixin(
|
||||||
this.__hasInitialSelectedFormElement = false;
|
this.__hasInitialSelectedFormElement = false;
|
||||||
this.hasNoDefaultSelected = false;
|
this.hasNoDefaultSelected = false;
|
||||||
this._repropagationRole = 'choice-group'; // configures FormControlMixin
|
this._repropagationRole = 'choice-group'; // configures FormControlMixin
|
||||||
this.__setupEventListeners();
|
|
||||||
this.__initInteractionStates();
|
this.__initInteractionStates();
|
||||||
}
|
}
|
||||||
|
|
||||||
connectedCallback() {
|
|
||||||
this._listboxNode.registrationTarget = this;
|
|
||||||
if (super.connectedCallback) {
|
|
||||||
super.connectedCallback();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
disconnectedCallback() {
|
disconnectedCallback() {
|
||||||
if (super.disconnectedCallback) {
|
if (super.disconnectedCallback) {
|
||||||
super.disconnectedCallback();
|
super.disconnectedCallback();
|
||||||
|
|
@ -233,6 +225,8 @@ export class LionSelectRich extends ScopedElementsMixin(
|
||||||
|
|
||||||
this.__setupInvokerNode();
|
this.__setupInvokerNode();
|
||||||
this.__setupListboxNode();
|
this.__setupListboxNode();
|
||||||
|
this.__setupEventListeners();
|
||||||
|
this._listboxNode.registrationTarget = this;
|
||||||
|
|
||||||
formRegistrarManager.addEventListener('all-forms-open-for-registration', () => {
|
formRegistrarManager.addEventListener('all-forms-open-for-registration', () => {
|
||||||
// Now that we have rendered + registered our listbox, try setting the user defined modelValue again
|
// Now that we have rendered + registered our listbox, try setting the user defined modelValue again
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue