@salesforcedevs/docs-components
Advanced tools
Comparing version 1.3.325-rnbtab-alpha3 to 1.3.325-rnbtab-alpha4
{ | ||
"name": "@salesforcedevs/docs-components", | ||
"version": "1.3.325-rnbtab-alpha3", | ||
"version": "1.3.325-rnbtab-alpha4", | ||
"description": "Docs Lightning web components for DSC", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -121,3 +121,5 @@ /* eslint-disable @lwc/lwc/no-document-query */ | ||
headingElements.forEach((headingElement: any) => { | ||
// Sometimes elements hash and header is not being set when slot content is wrapped with div | ||
headingElement.hash = headingElement.attributes.hash?.nodeValue; | ||
headingElement.header = headingElement.attributes.header?.nodeValue; | ||
}); | ||
@@ -151,3 +153,4 @@ this.updateTocItems(headingElements); | ||
const url = new URL(window.location.href); | ||
if (url.searchParams.get("type") !== tabID) { | ||
const selectedTabId = this.getSelectedTabId(); | ||
if (selectedTabId !== tabID) { | ||
url.searchParams.set("type", tabID); | ||
@@ -216,6 +219,10 @@ url.hash = ""; | ||
private restoreTabSelection() { | ||
private getSelectedTabId() { | ||
const urlParams = new URLSearchParams(window.location.search); | ||
const selectedTabId = urlParams.get("type"); | ||
return selectedTabId; | ||
} | ||
private restoreTabSelection() { | ||
const selectedTabId = this.getSelectedTabId(); | ||
if (selectedTabId) { | ||
@@ -222,0 +229,0 @@ this.selectTabById(selectedTabId); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
260372
6682