@salesforcedevs/dx-components 0.19.3-alpha.60 → 0.19.3-alpha.64
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
|
@@ -78,10 +78,12 @@ export default class Sidebar extends LightningElement {
|
|
|
78
78
|
this.expanded = !this.matchMedia.matches;
|
|
79
79
|
this.onMediaChange(this.matchMedia);
|
|
80
80
|
this.matchMedia.addEventListener("change", this.onMediaChange);
|
|
81
|
+
window.addEventListener('referencecontentloaded', this.dispatchHighlightedTermChange);
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
disconnectedCallback() {
|
|
84
85
|
this.matchMedia.removeEventListener("change", this.onMediaChange);
|
|
86
|
+
window.removeEventListener('referencecontentloaded', this.dispatchHighlightedTermChange);
|
|
85
87
|
}
|
|
86
88
|
|
|
87
89
|
private onMediaChange = (event: MediaQueryListEvent | MediaQueryList) =>
|
|
@@ -120,19 +122,23 @@ export default class Sidebar extends LightningElement {
|
|
|
120
122
|
window.clearTimeout(this._searchTimeout);
|
|
121
123
|
this._searchTimeout = window.setTimeout(() => {
|
|
122
124
|
this.assignFilteredTrees();
|
|
123
|
-
this.
|
|
124
|
-
new CustomEvent("highlightedtermchange", {
|
|
125
|
-
detail: {
|
|
126
|
-
query: this.searchText,
|
|
127
|
-
termsToHighlight: [this.searchText]
|
|
128
|
-
},
|
|
129
|
-
composed: true,
|
|
130
|
-
bubbles: true
|
|
131
|
-
})
|
|
132
|
-
);
|
|
125
|
+
this.dispatchHighlightedTermChange();
|
|
133
126
|
}, WAIT_TIME);
|
|
134
127
|
}
|
|
135
128
|
|
|
129
|
+
private dispatchHighlightedTermChange = () => {
|
|
130
|
+
this.dispatchEvent(
|
|
131
|
+
new CustomEvent("highlightedtermchange", {
|
|
132
|
+
detail: {
|
|
133
|
+
query: this.searchText,
|
|
134
|
+
termsToHighlight: [this.searchText]
|
|
135
|
+
},
|
|
136
|
+
composed: true,
|
|
137
|
+
bubbles: true
|
|
138
|
+
})
|
|
139
|
+
);
|
|
140
|
+
};
|
|
141
|
+
|
|
136
142
|
private assignFilteredTrees() {
|
|
137
143
|
this.filteredTrees = this._trees
|
|
138
144
|
.map((singleTree) => {
|