@salesforcedevs/dx-components 0.19.3-alpha.28 → 0.19.3-alpha.32
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
|
@@ -141,12 +141,6 @@ export default class SidebarSearch extends LightningElement {
|
|
|
141
141
|
);
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
// If this is the first render and there is a search value, trigger
|
|
145
|
-
// term highlighting
|
|
146
|
-
if (!this.didRender && this.value) {
|
|
147
|
-
this.dispatchHighlightedTermChange();
|
|
148
|
-
}
|
|
149
|
-
|
|
150
144
|
this.didRender = true;
|
|
151
145
|
}
|
|
152
146
|
|
|
@@ -11,6 +11,7 @@ export const highlightTerms = (
|
|
|
11
11
|
): void => {
|
|
12
12
|
const searchExp = createSearchRegExp(termsToHighlight);
|
|
13
13
|
let scrolled = false;
|
|
14
|
+
console.log({ elements, query, termsToHighlight, searchExp });
|
|
14
15
|
elements.forEach((element) => {
|
|
15
16
|
if (
|
|
16
17
|
element?.innerHTML.includes("<dx-") ||
|
|
@@ -35,12 +36,12 @@ export const highlightTerms = (
|
|
|
35
36
|
console.error(e, element);
|
|
36
37
|
}
|
|
37
38
|
|
|
38
|
-
element
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
// element
|
|
40
|
+
// .querySelectorAll("mark")
|
|
41
|
+
// .forEach(
|
|
42
|
+
// (el) =>
|
|
43
|
+
// (el.style.backgroundColor = "var(--dx-g-yellow-vibrant-90)")
|
|
44
|
+
// );
|
|
44
45
|
|
|
45
46
|
const mark = element.querySelector("mark");
|
|
46
47
|
if (mark && !scrolled) {
|