zefoy / ngx-dropzone-wrapper

Angular wrapper library for Dropzone
MIT License
174 stars 51 forks source link

Add init event #124

Closed rvmladenov closed 5 years ago

rvmladenov commented 5 years ago

The init event which I am adding in the "config" object is not been called when the Dropzone creates an instance. Is this a bug of some sort or it should be added as event for the directive(I saw that this is not been added there). The only way I managed to make it work is to emit an "addedFile" event which in my case is not a solution. Since I have dynamic container and template views I am loading the directive in the "ngAfterViewInit()" using a variable "loaded" which is been set as "true". But when everything initializes - I can not get reference of the ViewChild for the dropzone directive .

sconix commented 5 years ago

Afaik dropzone does not have an init event. At least I can not find such event from the documentation. So to what init event are you referring to?

But I guess I could add init event sending when dropzone instance is created to the directive. This I can do for next release if thats what you are after?

rvmladenov commented 5 years ago

"Init" is actually in the section of "functions you can override to change or extend default behavior:". And it is called when dropzone is initialized. So my mistake, it is not an event.

It will be great to add what you are suggesting. Some init even upon creation. Thanks :)

sconix commented 5 years ago

I added the init event for the 7.2.1 release which is out now.

rvmladenov commented 5 years ago

Thank you