@fluid-topics/ft-search-results 1.1.102 → 1.1.103

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.
@@ -18,6 +18,7 @@ export declare class FtSearchResults extends FtSearchResults_base implements FtS
18
18
  constructor();
19
19
  protected render(): unknown;
20
20
  protected update(props: PropertyValues): void;
21
+ protected contentAvailableCallback(props: PropertyValues): void;
21
22
  private onClusterChange;
22
23
  private buildClusters;
23
24
  private buildFullClusters;
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { html } from "lit";
8
8
  import { repeat } from "lit/directives/repeat.js";
9
9
  import { property } from "lit/decorators.js";
10
- import { jsonProperty, redux } from "@fluid-topics/ft-wc-utils";
10
+ import { jsonProperty, redux, scrollHelper, } from "@fluid-topics/ft-wc-utils";
11
11
  import { styles } from "./ft-search-results.styles";
12
12
  import { FtSearchComponent } from "@fluid-topics/ft-search-context/build/registration";
13
13
  import "@fluid-topics/ft-search-result-context";
@@ -52,6 +52,16 @@ class FtSearchResults extends withI18n(FtSearchComponent) {
52
52
  (_a = this.stateManager) === null || _a === void 0 ? void 0 : _a.setClusterSortCriterion(this.clusterSortCriterion);
53
53
  }
54
54
  }
55
+ contentAvailableCallback(props) {
56
+ var _a;
57
+ super.contentAvailableCallback(props);
58
+ if (props.has("request")) {
59
+ const target = (_a = this.renderRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`ft-search-result-context`);
60
+ if (target) {
61
+ scrollHelper.scrollIntoViewIfPossible(target, { position: 1, behavior: "smooth" });
62
+ }
63
+ }
64
+ }
55
65
  onClusterChange(clusterId, result) {
56
66
  this.selectedResultByCluster[clusterId] = result;
57
67
  }