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

Incorrect self reference in recursive grid #12

Open
jamesguitar3 opened this issue Jul 27, 2018 · 0 comments
Open

Incorrect self reference in recursive grid #12

jamesguitar3 opened this issue Jul 27, 2018 · 0 comments

Comments

@jamesguitar3
Copy link

Issue: When create recursive grid (grid inside another grid), the global variable self is override by the last grid created, and all event emits are messed up due to the incorrect reference.

Is there any particular reason you assigned this to self, instead of using arrow function in all events? Assuming you were trying to avoid this from Vue to be confused by this in the functions.

I was able to resolve this issue by removing the self assignment and use arrow functions as below.
this.grid.on('synchronize', ()=> { this.$emit('synchronize') });

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

No branches or pull requests

1 participant