Skip to content

Commit

Permalink
fix(viewer): emit selected resource always (DSP-1809) (#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
kilchenmann committed Jul 22, 2021
1 parent 1b6272e commit c881cb6
Showing 1 changed file with 2 additions and 6 deletions.
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit c881cb6

Please sign in to comment.