diff --git a/showcase/src/app/demo-ui/pages/generic-search/demo-generic-search-page.component.html b/showcase/src/app/demo-ui/pages/generic-search/demo-generic-search-page.component.html
index 2729c4a8d0..0166166561 100644
--- a/showcase/src/app/demo-ui/pages/generic-search/demo-generic-search-page.component.html
+++ b/showcase/src/app/demo-ui/pages/generic-search/demo-generic-search-page.component.html
@@ -26,7 +26,7 @@
SHOWCASE.DEMO.SHARED.EXAMPLE_VIEWER_LIST
htmlId="demo-generic-search-table"
[columnProperties]="columnsProperties"
[paginationConfig]="paginationConfig"
- [data]="searchResults"
+ [data]="results$ | async"
[starkProgressIndicator]="progressIndicatorConfig"
>
SHOWCASE.DEMO.GENERIC_SEARCH.SEARCH_RESULTS
diff --git a/showcase/src/app/demo-ui/pages/generic-search/demo-generic-search-page.component.ts b/showcase/src/app/demo-ui/pages/generic-search/demo-generic-search-page.component.ts
index fceb625c75..cd09d141aa 100644
--- a/showcase/src/app/demo-ui/pages/generic-search/demo-generic-search-page.component.ts
+++ b/showcase/src/app/demo-ui/pages/generic-search/demo-generic-search-page.component.ts
@@ -1,4 +1,4 @@
-import { Component, Inject, OnInit } from "@angular/core";
+import { Component, Inject } from "@angular/core";
import { STARK_LOGGING_SERVICE, StarkLoggingService } from "@nationalbankbelgium/stark-core";
import { ReferenceLink } from "../../../shared";
import {
@@ -15,7 +15,7 @@ import { DemoGenericService } from "./services";
selector: "demo-generic-search",
templateUrl: "./demo-generic-search-page.component.html"
})
-export class DemoGenericSearchPageComponent extends AbstractStarkSearchComponent implements OnInit {
+export class DemoGenericSearchPageComponent extends AbstractStarkSearchComponent {
public hideSearch = false;
public columnsProperties: StarkTableColumnProperties[] = [
@@ -38,7 +38,6 @@ export class DemoGenericSearchPageComponent extends AbstractStarkSearchComponent
isSortable: true
}
];
- public searchResults?: HeroMovie[];
public paginationConfig: StarkPaginationConfig = {
isExtended: false,
itemsPerPage: 10,
@@ -71,12 +70,4 @@ export class DemoGenericSearchPageComponent extends AbstractStarkSearchComponent
this.performSearchOnInit = true; // Turn on automatic search (last search criteria)
this.preserveLatestResults = true; // Keep a reference to the latest results in the latestResults variable
}
-
- /**
- * Component lifecycle hook
- */
- public override ngOnInit(): void {
- super.ngOnInit();
- this.results$.subscribe((genericObjects: HeroMovie[]) => (this.searchResults = genericObjects));
- }
}