Skip to content
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

Merged
merged 2 commits into from
May 3, 2019
Merged

Support anonymous binding better #69

merged 2 commits into from
May 3, 2019

Conversation

monkeyWzr
Copy link
Collaborator

Support anonymous binding better. Skip unnecessary updates and make removeEventListener work.

#34

const { events, handler, middleware, isActive } = processDirectiveArguments(value)

if (!isActive) {
removeInstance(el)
return
}

if (JSON.stringify(value) === JSON.stringify(oldValue)) {
Copy link
Owner

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?

Copy link
Collaborator Author

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!

@ndelvalle
Copy link
Owner

Thanks for the contribution @monkeyWzr, I just had a small comment, let me know what you think 🙂
This PR also solves #62, what do you think @trongthanh?

@trongthanh
Copy link

trongthanh commented May 3, 2019

@ndelvalle It looks fine. Please publish to alpha tag so that I can help test it.

@ndelvalle ndelvalle merged commit 7de3278 into ndelvalle:master May 3, 2019
@ndelvalle
Copy link
Owner

@monkeyWzr @trongthanh v-click-outside 2.1.2-0 published 🎉. Thanks for the contribution, let me know how the test goes @trongthanh :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants