diff --git a/packages/components/blockquote-tabs/src/BlockquoteTabs.js b/packages/components/blockquote-tabs/src/BlockquoteTabs.js index ef868fe..012ef70 100644 --- a/packages/components/blockquote-tabs/src/BlockquoteTabs.js +++ b/packages/components/blockquote-tabs/src/BlockquoteTabs.js @@ -123,6 +123,8 @@ export class BlockquoteTabs extends BlockquoteMixinSlotContent(LitElement) { }, skipInitial: true, }); + + this.addEventListener('slotchanges', this._onSlotChanges); } _selectedIsInRange(idx) { @@ -145,11 +147,6 @@ export class BlockquoteTabs extends BlockquoteMixinSlotContent(LitElement) { return this._tabList.length; } - connectedCallback() { - super.connectedCallback?.(); - this.shadowRoot?.addEventListener('slotchanges', this._onSlotChanges); - } - firstUpdated(props) { super.firstUpdated && super.firstUpdated(props); const tabSlot = this.shadowRoot?.querySelector('[name="tab"]'); diff --git a/packages/components/blockquote-tabs/src/tab/BlockquoteTab.js b/packages/components/blockquote-tabs/src/tab/BlockquoteTab.js index 7428fb0..ed9fabd 100644 --- a/packages/components/blockquote-tabs/src/tab/BlockquoteTab.js +++ b/packages/components/blockquote-tabs/src/tab/BlockquoteTab.js @@ -30,6 +30,8 @@ export class BlockquoteTab extends BlockquoteMixinSlotContent(LitElement) { slot: 'tab', tabindex: 0, }; + + this.addEventListener('slotchanges', this._onSlotChanges); } static get styles() { @@ -38,8 +40,6 @@ export class BlockquoteTab extends BlockquoteMixinSlotContent(LitElement) { connectedCallback() { super.connectedCallback?.(); - this.shadowRoot?.addEventListener('slotchanges', this._onSlotChanges); - this.__setArrayAttibute(this.globalRootAttributes); }