From c881cb6bfebbd945eaeed9865e6e3815e6301b6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Kilchenmann?= Date: Thu, 22 Jul 2021 15:04:51 +0200 Subject: [PATCH] fix(viewer): emit selected resource always (DSP-1809) (#317) --- .../src/lib/viewer/views/list-view/list-view.component.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/projects/dsp-ui/src/lib/viewer/views/list-view/list-view.component.ts b/projects/dsp-ui/src/lib/viewer/views/list-view/list-view.component.ts index 9ef05f21..ae83d1b8 100644 --- a/projects/dsp-ui/src/lib/viewer/views/list-view/list-view.component.ts +++ b/projects/dsp-ui/src/lib/viewer/views/list-view/list-view.component.ts @@ -161,9 +161,7 @@ export class ListViewComponent implements OnChanges { (response: ReadResourceSequence) => { this.resources = response; this.loading = false; - if (!this.withMultipleSelection) { - this.emitSelectedResources({count: 1, resListIndex: [0], resIds: [this.resources.resources[0].id], selectionType: "single"}); - } + this.emitSelectedResources({count: 1, resListIndex: [0], resIds: [this.resources.resources[0].id], selectionType: "single"}); }, (error: ApiResponseError) => { this._notification.openSnackBar(error); @@ -195,9 +193,7 @@ export class ListViewComponent implements OnChanges { (response: ReadResourceSequence) => { this.resources = response; this.loading = false; - if (!this.withMultipleSelection) { - this.emitSelectedResources({count: 1, resListIndex: [0], resIds: [this.resources.resources[0].id], selectionType: "single"}); - } + this.emitSelectedResources({count: 1, resListIndex: [0], resIds: [this.resources.resources[0].id], selectionType: "single"}); }, (error: ApiResponseError) => { this._notification.openSnackBar(error);