Skip to content

Commit

Permalink
NAS-129032: TrueCloud | Task is reselected to the first one after upd…
Browse files Browse the repository at this point in the history
…ate of any other selected task (#10073)
  • Loading branch information
AlexKarpov98 authored May 17, 2024
1 parent 8601c66 commit 571d289
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@ export class CloudBackupListComponent implements OnInit {
const cloudBackups$ = this.ws.call('cloud_backup.query').pipe(
tap((cloudBackups) => {
this.cloudBackups = cloudBackups;
this.dataProvider.expandedRow = this.isMobileView ? null : cloudBackups[0];
const selectedBackup = cloudBackups.find(
(cloudBackup) => cloudBackup.id === this.dataProvider?.expandedRow?.id,
);
this.dataProvider.expandedRow = this.isMobileView ? null : (selectedBackup || cloudBackups[0]);
this.expanded(this.dataProvider.expandedRow);
}),
);
Expand Down

0 comments on commit 571d289

Please sign in to comment.