vue-muuri icon indicating copy to clipboard operation
vue-muuri copied to clipboard

Incorrect self reference in recursive grid

Open jamesguitar3 opened this issue 5 years ago • 0 comments

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') });

jamesguitar3 avatar Jul 27 '18 18:07 jamesguitar3