public firstUpdated()

in components/RuiExpandCollapse/src/RuiExpandCollapse.ts [202:216]


	public firstUpdated(): void {
		if (this.shadowRoot) {
			this._buttonEl = this.shadowRoot.querySelector('button') || undefined;
			this._detailsSlotEl = this.shadowRoot.querySelector('#details-slot') as HTMLSlotElement || undefined;

			if (this._detailsSlotEl) {
				// when the slotted content changes we initialise expand collapse
				// we need to wait for this because the animation of height calc
				// will only work once the slot and it's content have mounted and rendered
				this._detailsSlotEl.addEventListener('slotchange', (): void => {
					this._initialiseExpandCollapse();
				});
			}
		}
	}