@salesforcedevs/docs-components
Advanced tools
Comparing version 1.3.345-refactor-tab-alpha5 to 1.3.345-refactor-tab-alpha6
{ | ||
"name": "@salesforcedevs/docs-components", | ||
"version": "1.3.345-refactor-tab-alpha5", | ||
"version": "1.3.345-refactor-tab-alpha6", | ||
"description": "Docs Lightning web components for DSC", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -405,17 +405,10 @@ /* eslint-disable @lwc/lwc/no-document-query */ | ||
onSlotChange(event: Event): void { | ||
const slotElements = ( | ||
event.target as HTMLSlotElement | ||
).assignedElements(); | ||
updateRNB = () => { | ||
const headingElements = this.getHeadingElements(); | ||
this.setHashAndHeaderForDocHeading(headingElements); | ||
}; | ||
if (slotElements.length) { | ||
this.contentLoaded = true; | ||
const slotContentElement = slotElements[0]; | ||
const headingElements = | ||
slotContentElement.ownerDocument?.getElementsByTagName( | ||
TOC_HEADER_TAG | ||
); | ||
this.setHashAndHeaderForDocHeading(headingElements); | ||
} | ||
onSlotChange(): void { | ||
this.updateRNB(); | ||
this.contentLoaded = true; | ||
} | ||
@@ -422,0 +415,0 @@ |
@@ -33,10 +33,6 @@ import ContentLayout from "doc/contentLayout"; | ||
private getTabPanelList() { | ||
// eslint-disable-next-line @lwc/lwc/no-document-query | ||
return document.querySelector("dx-tab-panel-list"); | ||
} | ||
updateRNB = () => { | ||
const headingElements = this.getHeadingElements(); | ||
this.setHashAndHeaderForDocHeading(headingElements); | ||
}; | ||
protected getHeadingElements() { | ||
@@ -94,2 +90,3 @@ let headingElements = super.getHeadingElements(); | ||
connectedCallback(): void { | ||
super.connectedCallback(); | ||
window.addEventListener("popstate", this.handlePopState); | ||
@@ -173,7 +170,2 @@ } | ||
} | ||
onSlotChange(): void { | ||
this.updateRNB(); | ||
this.contentLoaded = true; | ||
} | ||
} |
275402
6866