bergben / ng2-file-input

Angular 2 component that implements a drag and drop or select file selection, including preview.
MIT License
25 stars 11 forks source link

How to reset input? #7

Closed Juanperezc closed 7 years ago

Juanperezc commented 7 years ago

How can I reset the input and delete the selected items?

bergben commented 7 years ago

Hi @Juanperezc ,

this is currently not possible. I could however implement that feature through a service, probably in the next few days. :)

kidustiliksew commented 7 years ago

Yes please

bergben commented 7 years ago

working on it currently, will release a new version later today :)

bergben commented 7 years ago

@Juanperezc @kidustiliksew I have just released version 1.0.2 which tackles this issue. It also introduces some other enhancements such as more specific output events, programmatically adding or removing files and more.
Please check out the updated Readme, especially the Breaking changes in 1.0 and How to reset the file input.
Or simply take a look at the demo plnkr: http://plnkr.co/edit/eU7VM4j74ljN36bnZbPP?p=preview

Please report back in case that something is not working as expected, closing this ;)