@salesforcedevs/dw-components 1.3.49 → 1.3.51
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
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="panel-list-container">
|
|
3
3
|
<h2 class="title">{title}</h2>
|
|
4
|
-
<dx-tab-panel-list
|
|
4
|
+
<dx-tab-panel-list
|
|
5
|
+
tabs={tabLabels}
|
|
6
|
+
onchange={handleTabChange}
|
|
7
|
+
initial-index={activeTabIndex}
|
|
8
|
+
>
|
|
5
9
|
<template for:each={trials} for:item="trial">
|
|
6
10
|
<dx-tab-panel key={trial.label}>
|
|
7
11
|
<div
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { LightningElement, api, track } from "lwc";
|
|
2
2
|
import { toJson } from "dxUtils/normalizers";
|
|
3
3
|
|
|
4
|
+
const STORED_TAB_SELECTED_KEY = "storedTabIndex";
|
|
5
|
+
|
|
4
6
|
export default class BrowseTrials extends LightningElement {
|
|
5
7
|
@api title = "Browse Trials";
|
|
6
8
|
|
|
@@ -63,8 +65,18 @@ export default class BrowseTrials extends LightningElement {
|
|
|
63
65
|
}
|
|
64
66
|
];
|
|
65
67
|
|
|
68
|
+
connectedCallback() {
|
|
69
|
+
const storedTabIndex = window.localStorage.getItem(
|
|
70
|
+
STORED_TAB_SELECTED_KEY
|
|
71
|
+
);
|
|
72
|
+
if (storedTabIndex) {
|
|
73
|
+
this.activeTabIndex = +storedTabIndex;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
66
77
|
handleTabChange(e: CustomEvent) {
|
|
67
78
|
this.activeTabIndex = e.detail;
|
|
79
|
+
window.localStorage.setItem(STORED_TAB_SELECTED_KEY, e.detail);
|
|
68
80
|
}
|
|
69
81
|
|
|
70
82
|
filterCategories() {
|