@salesforcedevs/docs-components 1.3.327-rnbtab-alpha → 1.3.327-rnbtab-alpha2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -97,14 +97,19 @@ export default class ContentLayout extends LightningElement {
|
|
|
97
97
|
private hasRendered: boolean = false;
|
|
98
98
|
private contentLoaded: boolean = false;
|
|
99
99
|
private sidebarOpen: boolean = false;
|
|
100
|
+
private rnbByTab: boolean = false;
|
|
100
101
|
|
|
101
102
|
get shouldDisplayFeedback() {
|
|
102
103
|
return this.contentLoaded && typeof Sprig !== "undefined";
|
|
103
104
|
}
|
|
104
105
|
|
|
105
|
-
|
|
106
|
+
private setRNBByTab() {
|
|
106
107
|
const tabPanelListItem: any = this.getTabPanelList();
|
|
107
|
-
|
|
108
|
+
this.rnbByTab = tabPanelListItem?.id === RNB_BY_TAB ? true : false;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
get showTabBasedRNB() {
|
|
112
|
+
return this.rnbByTab;
|
|
108
113
|
}
|
|
109
114
|
|
|
110
115
|
onTabChanged = () => {
|
|
@@ -205,10 +210,6 @@ export default class ContentLayout extends LightningElement {
|
|
|
205
210
|
);
|
|
206
211
|
this.searchSyncer.init();
|
|
207
212
|
}
|
|
208
|
-
|
|
209
|
-
if (this.showTabBasedRNB) {
|
|
210
|
-
window.addEventListener("tabchanged", this.onTabChanged);
|
|
211
|
-
}
|
|
212
213
|
}
|
|
213
214
|
|
|
214
215
|
private getSelectedTabId() {
|
|
@@ -264,7 +265,9 @@ export default class ContentLayout extends LightningElement {
|
|
|
264
265
|
|
|
265
266
|
if (!this.hasRendered) {
|
|
266
267
|
this.hasRendered = true;
|
|
268
|
+
this.setRNBByTab();
|
|
267
269
|
if (this.showTabBasedRNB) {
|
|
270
|
+
window.addEventListener("tabchanged", this.onTabChanged);
|
|
268
271
|
this.restoreTabSelection();
|
|
269
272
|
}
|
|
270
273
|
this.restoreScroll();
|