@salesforcedevs/docs-components 1.3.327-rnbtab-alpha1 → 1.3.327-rnbtab-alpha3
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
|
@@ -210,10 +210,6 @@ export default class ContentLayout extends LightningElement {
|
|
|
210
210
|
);
|
|
211
211
|
this.searchSyncer.init();
|
|
212
212
|
}
|
|
213
|
-
|
|
214
|
-
if (this.showTabBasedRNB) {
|
|
215
|
-
window.addEventListener("tabchanged", this.onTabChanged);
|
|
216
|
-
}
|
|
217
213
|
}
|
|
218
214
|
|
|
219
215
|
private getSelectedTabId() {
|
|
@@ -223,10 +219,12 @@ export default class ContentLayout extends LightningElement {
|
|
|
223
219
|
}
|
|
224
220
|
|
|
225
221
|
private restoreTabSelection() {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
222
|
+
requestAnimationFrame(() => {
|
|
223
|
+
const selectedTabId = this.getSelectedTabId();
|
|
224
|
+
if (selectedTabId) {
|
|
225
|
+
this.selectTabById(selectedTabId);
|
|
226
|
+
}
|
|
227
|
+
});
|
|
230
228
|
}
|
|
231
229
|
|
|
232
230
|
private getAllTabs(): any[] {
|
|
@@ -271,6 +269,7 @@ export default class ContentLayout extends LightningElement {
|
|
|
271
269
|
this.hasRendered = true;
|
|
272
270
|
this.setRNBByTab();
|
|
273
271
|
if (this.showTabBasedRNB) {
|
|
272
|
+
window.addEventListener("tabchanged", this.onTabChanged);
|
|
274
273
|
this.restoreTabSelection();
|
|
275
274
|
}
|
|
276
275
|
this.restoreScroll();
|