-
Notifications
You must be signed in to change notification settings - Fork 86
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
Support anonymous binding better #69
Conversation
lib/v-click-outside.js
Outdated
const { events, handler, middleware, isActive } = processDirectiveArguments(value) | ||
|
||
if (!isActive) { | ||
removeInstance(el) | ||
return | ||
} | ||
|
||
if (JSON.stringify(value) === JSON.stringify(oldValue)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we move this to be the first thing to be executed in the update
method? Above isActive
check and processDirectiveArguments
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you are right. I modified that. Thank you!
Thanks for the contribution @monkeyWzr, I just had a small comment, let me know what you think 🙂 |
@ndelvalle It looks fine. Please publish to alpha tag so that I can help test it. |
@monkeyWzr @trongthanh v-click-outside 2.1.2-0 published 🎉. Thanks for the contribution, let me know how the test goes @trongthanh :) |
Support anonymous binding better. Skip unnecessary updates and make
removeEventListener
work.#34