@salesforcedevs/dx-components 0.10.1-alpha.103 → 0.10.1-alpha.107
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
|
@@ -115,6 +115,7 @@ export default class SidebarSearch extends LightningElement {
|
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
117
117
|
const state = JSON.parse(stringified);
|
|
118
|
+
console.log({ state }, state?.query?.q === this.value, this.value);
|
|
118
119
|
if (state?.query?.q === this.value) {
|
|
119
120
|
this.preloadedState = state;
|
|
120
121
|
}
|
|
@@ -150,12 +151,19 @@ export default class SidebarSearch extends LightningElement {
|
|
|
150
151
|
|
|
151
152
|
this.resultList?.subscribe(this.onResultListChange);
|
|
152
153
|
|
|
154
|
+
if (this.preloadedState) {
|
|
155
|
+
this.searchBox.updateText(this.value || "");
|
|
156
|
+
}
|
|
157
|
+
|
|
153
158
|
if (!this.isValueEmpty) {
|
|
154
159
|
this.dispatchHighlightedTermChange();
|
|
155
160
|
}
|
|
156
|
-
|
|
157
|
-
if (!this.preloadedState) {
|
|
158
|
-
|
|
161
|
+
|
|
162
|
+
if (!this.preloadedState && !this.isValueEmpty) {
|
|
163
|
+
this.submitSearch();
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
if (!this.preloadedState && this.isValueEmpty) {
|
|
159
167
|
this.dispatchOnLoading(false);
|
|
160
168
|
}
|
|
161
169
|
};
|
|
@@ -242,6 +250,7 @@ export default class SidebarSearch extends LightningElement {
|
|
|
242
250
|
};
|
|
243
251
|
|
|
244
252
|
private updateSessionStorage() {
|
|
253
|
+
console.log("updating session storage", this.engine?.state);
|
|
245
254
|
window.sessionStorage.setItem(
|
|
246
255
|
SESSION_KEY,
|
|
247
256
|
JSON.stringify(this.engine?.state)
|
|
@@ -324,6 +333,10 @@ export default class SidebarSearch extends LightningElement {
|
|
|
324
333
|
private onInputChange(e: CustomEvent) {
|
|
325
334
|
this.value = e.detail;
|
|
326
335
|
|
|
336
|
+
if (!this.isValueEmpty) {
|
|
337
|
+
this.dispatchOnLoading(true);
|
|
338
|
+
}
|
|
339
|
+
|
|
327
340
|
if (this.searchBox && !this.isValueEmpty) {
|
|
328
341
|
this.submitSearch();
|
|
329
342
|
}
|