@salesforcedevs/dx-components 0.10.1-alpha.135 → 0.10.1-alpha.139
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
|
@@ -37,19 +37,22 @@ export default class SidebarSearch extends LightningElement {
|
|
|
37
37
|
return this._coveoAdvancedQueryConfig;
|
|
38
38
|
}
|
|
39
39
|
set coveoAdvancedQueryConfig(value: string) {
|
|
40
|
-
|
|
40
|
+
const jsonValue = toJson(value);
|
|
41
|
+
const hasChanged =
|
|
42
|
+
this._coveoAdvancedQueryConfig &&
|
|
43
|
+
Object.entries(jsonValue).every(([key, val]: [string, any]) => {
|
|
44
|
+
console.log(key, value);
|
|
45
|
+
return this._coveoAdvancedQueryConfig[key] === val;
|
|
46
|
+
});
|
|
47
|
+
console.log({ hasChanged }, this._coveoAdvancedQueryConfig, value);
|
|
48
|
+
this._coveoAdvancedQueryConfig = jsonValue;
|
|
41
49
|
|
|
42
|
-
if (
|
|
43
|
-
this._coveoAdvancedQueryConfigValue &&
|
|
44
|
-
value !== this._coveoAdvancedQueryConfigValue &&
|
|
45
|
-
this.engine
|
|
46
|
-
) {
|
|
50
|
+
if (hasChanged && this.engine) {
|
|
47
51
|
// set adnvanced filters needs access to the latest coveoAdvancedQueryConfig
|
|
52
|
+
this.dispatchOnLoading(true);
|
|
48
53
|
this.setAdvancedFilters(this.engine);
|
|
49
54
|
this.submitSearch();
|
|
50
55
|
}
|
|
51
|
-
|
|
52
|
-
this._coveoAdvancedQueryConfigValue = value;
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
@api
|
|
@@ -65,7 +68,6 @@ export default class SidebarSearch extends LightningElement {
|
|
|
65
68
|
this.value = searchTerm || "";
|
|
66
69
|
}
|
|
67
70
|
|
|
68
|
-
private _coveoAdvancedQueryConfigValue!: string;
|
|
69
71
|
private _coveoAdvancedQueryConfig!: { [key: string]: any };
|
|
70
72
|
private dropdownRequestedOpen: boolean = false;
|
|
71
73
|
private recentSearches: Option[] = [];
|