pIvan / file-upload

drag and drop file component
MIT License
87 stars 12 forks source link

File upload icon does not align correctly when adding files to template-driven file-upload component. #64

Closed Riuen closed 2 years ago

Riuen commented 2 years ago

There seems to be an issue when using the file upload component in a template-driven form.

HTML <file-upload [(ngModel)]="source" name="files" (ngModelChange)="onChange($event)" #fileComp></file-upload>

When the variable called "source" is empty then the file upload component displays the default "Drag and drop files or click here"message along with the file upload icon. However, once I programmatically populate the variable then the default message goes away but the file upload icon is still left in the center of the component.

Screenshots fileupload_no_files

fileupload_w_files

Expected Behaviour File upload icon should be aligned to the top right corner of the component.

Angular Version: 12.2.9 ngx-file-upload version: 3.3.1

pIvan commented 2 years ago

Hi @Riuen,

please check css definition, that part is hidden with selector:

.list-visible .upload-text {
    display: none;
}