@salesforcedevs/dx-components 0.19.3-alpha.5 → 0.19.3-alpha.9

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/dx-components",
3
- "version": "0.19.3-alpha.5",
3
+ "version": "0.19.3-alpha.9",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -217,10 +217,6 @@ export default class SidebarSearch extends LightningElement {
217
217
  this.onResultListChange
218
218
  );
219
219
 
220
- if (this.value) {
221
- this.dispatchHighlightedTermChange();
222
- }
223
-
224
220
  if (!this.preloadedState) {
225
221
  if (this.value) {
226
222
  this.submitSearch();
@@ -365,6 +361,8 @@ export default class SidebarSearch extends LightningElement {
365
361
 
366
362
  private submitSearch = debounce((isSyncingSearchValue = false) => {
367
363
  if (this.searchBox) {
364
+ this.dispatchHighlightedTermChange();
365
+
368
366
  UserRecentSearches.add(this.value);
369
367
  this.updateRecentSearches();
370
368
 
@@ -400,7 +398,6 @@ export default class SidebarSearch extends LightningElement {
400
398
  this.value = e.detail;
401
399
 
402
400
  this.handleValueChange(false);
403
- this.dispatchHighlightedTermChange();
404
401
  }
405
402
 
406
403
  private onInputFocus() {
@@ -31,9 +31,8 @@ export const highlightTerms = (
31
31
  const mark = element.querySelector("mark");
32
32
 
33
33
  if (mark && !scrolled) {
34
- console.log(mark)
35
34
  scrolled = true;
36
- mark.scrollIntoView();
35
+ element.scrollIntoView({ block: "nearest" });
37
36
  }
38
37
 
39
38
  element.innerHTML = innerHtml;