-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong logic is used in case of events #21
Comments
Yes, it seems that you are actually overriding the hooks instead of adding event listeners. Maybe adding properties like |
I am having trouble understanding the issue. How would I go to recreate this problem? Also, @kkamkou try assigning a function property instead of an action to the |
It doesn't matter. In the variant you propose me, I lose the context of the callback. And it won't fix the problem.
true
I see it from the code. All you need to do (in case you want to fix it) is to register events like events and not like an attribute. |
@kkamkou oohh yes I see. Thanks for pointing this out. Will definitely fix this. |
Fixed the event handling logic 7eb7b33. Declare the event function in controller for example:
Declare component
You can update to version |
It works, thank you. |
Events are used to
notify
other listeners about an event. What you did, is just a wrapper for a new object.What was expected:
event
, I cansubscribe
and reactWhat we have:
{{drop-zone url=imageUploadUrl addRemoveLinks=true complete=(action "onUploadComplete")}}
complete
event, replacing the default one.How to fix:
emit
function. Preserving the native event. Example:instance.on('complete', this.complete)
Workaround:
noop
events, like:queuecomplete
,addedfiles
, etc. see the source code.The text was updated successfully, but these errors were encountered: