@salesforcedevs/dx-components 0.19.3-alpha.14 → 0.19.3-alpha.18
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
|
@@ -144,7 +144,9 @@ export default class SidebarSearch extends LightningElement {
|
|
|
144
144
|
// If this is the first render and there is a search value, trigger
|
|
145
145
|
// term highlighting
|
|
146
146
|
if (!this.didRender && this.value) {
|
|
147
|
+
console.log('dispatching highlight term in the render')
|
|
147
148
|
this.dispatchHighlightedTermChange();
|
|
149
|
+
document.addEventListener('search-syncer-initialized', () => console.log('SEARCH SYNCER INITD'))
|
|
148
150
|
}
|
|
149
151
|
|
|
150
152
|
this.didRender = true;
|
|
@@ -34,6 +34,7 @@ export const highlightTerms = (
|
|
|
34
34
|
innerHtml = innerHtml.replace(searchExp, "<mark>$&</mark>");
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
element.setAttribute('lwc:dom', 'manual')
|
|
37
38
|
element.innerHTML = innerHtml;
|
|
38
39
|
} catch (e) {
|
|
39
40
|
console.error(e, element);
|
|
@@ -43,8 +44,8 @@ export const highlightTerms = (
|
|
|
43
44
|
const mark = element.querySelector("mark");
|
|
44
45
|
if (mark && !scrolled) {
|
|
45
46
|
scrolled = true;
|
|
46
|
-
console.log("scrolling",
|
|
47
|
-
|
|
47
|
+
console.log("scrolling", mark);
|
|
48
|
+
mark.scrollIntoView({ block: "nearest" });
|
|
48
49
|
}
|
|
49
50
|
});
|
|
50
51
|
};
|