Delete multiple images in one go if I select 2 or more images

This commit is contained in:
Rajnikant 2022-04-13 15:58:10 +05:30
parent c86769dd4f
commit 258e9f02c2
2 changed files with 2 additions and 2 deletions

View File

@ -52,7 +52,7 @@
<ng-container matColumnDef="delete" >
<mat-header-cell *matHeaderCellDef>
<button mat-button *ngIf="selection.hasValue() && isAllSelected()" (click)="deleteAllFiles()" aria-label="Example icon button with a delete icon">
<button mat-button *ngIf="(selection.hasValue() && isAllSelected()) || selection.selected.length > 1" (click)="deleteAllFiles()" aria-label="Example icon button with a delete icon">
<mat-icon>delete</mat-icon>
</button>
</mat-header-cell>

View File

@ -129,7 +129,7 @@ export class ImageManagerComponent implements OnInit {
disableClose: true,
data: {
server: this.server,
deleteFilesPaths: this.imageDatabase.data
deleteFilesPaths: this.selection.selected
}
});