merlosy/ngx-material-file-input

Bug when clear input

Closed this issue · 4 comments

I think there is a bug when you clear the input. If I remove a file and insert the same file again, the input doesn't accept it. This bug is present in the demo page.

Very annoying bug. Any workaround?

Yes. I discovered that the file input is not being cleaned when you call the clear function, so I did this:

this.fileImage.clear();
this.fileImage._elementRef.nativeElement.children[0].value = null;

Thanks, it worked like a charm

Fix merged with #26 and available with v1.1.1