here what i am doing is i am creating a "Drag n Drop feature" using ng2 file upload and here my issue is when ever im trying to drop more than one file the select all function will be enabled and it will select all check boxes by default but that is not happening in my scenario after file drop
https://stackblitz.com/edit/angular-r6cbrj
<div class="container">
<div class="well well-lg metadata-well text-center add-file ">
<h4 style="float:left ">
<span *ngIf="uploader?.queue?.length> 1">
<input type="checkbox" id="selectAll" [(ngModel)]="selectAll" (change)="selectAllFiles($event)" class="form-check-input deltha">
</span>Add Files</h4>
<br />
<br />
</div>
<span *ngIf="uploader?.queue?.length== 0">
<p class="text-wrap">Your upload queue is empty.
<br />Drag and drop files to add them to the queue</p>
</span>
<span *ngIf="uploader?.queue?.length > 0">
<div class="upload-section">
<table class="table">
<tbody>
<tr *ngFor="let item of uploader.queue;let i = index">
<td style="padding-top: 0rem">
<div class="form-check">
<label class="form-check-label">
<input type="checkbox" class="form-check-input" value="" [checked]="fileSelectState[item?.file?.name]"
(change)="fileChecked($event)">
</label>
</div>
</td>
<td id="">
<a (click)="selectFile($event);">
<strong></strong>
</a>
</td>
<td> MB</td>
<td ></td>
<td>
<button type="button" class="icon-button" (click)="item.remove();fileRemoved(item)">
<i class="fas fa-times"></i>
</button>
</td>
</tr>
</tbody>
</table>
</div>
</span>
<div ng2FileDrop [ngClass]="{'nv-file-over': hasBaseDropZoneOver}" (fileOver)="fileOverBase($event)" (onFileDrop)="fileDropped($event)" [uploader]="uploader" class="well well-sm metadata-well-sm text-center my-drop-zone">
<img src= />
<p>Drag and drop your files here</p>
</div>
</div>
from having issue in select all check boxes at the time on file drop using angular
No comments:
Post a Comment