Skip to content

Commit

Permalink
121787: wrap the values in browseByType$ in a singleton object so tha…
Browse files Browse the repository at this point in the history
…t same-type browses still cause a lifecycle trigger
  • Loading branch information
Jens Vannerum committed Dec 16, 2024
1 parent 6c1a2f2 commit 5352f26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/browse-by/browse-by-page/browse-by-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { BrowseBySwitcherComponent } from '../browse-by-switcher/browse-by-switc
})
export class BrowseByPageComponent implements OnInit {

browseByType$: Observable<BrowseByDataType>;
browseByType$: Observable<{type: BrowseByDataType }>;

constructor(
protected route: ActivatedRoute,
Expand All @@ -35,7 +35,7 @@ export class BrowseByPageComponent implements OnInit {
*/
ngOnInit(): void {
this.browseByType$ = this.route.data.pipe(
map((data: { browseDefinition: BrowseDefinition }) => data.browseDefinition.getRenderType()),
map((data: { browseDefinition: BrowseDefinition }) => ({ type: data.browseDefinition.getRenderType() })),
);
}

Expand Down

0 comments on commit 5352f26

Please sign in to comment.