vue-muuri
vue-muuri copied to clipboard
Use this.$el to initialize grid
Currently Muurri initializes like this:
createGrid () {
this.grid = new Muuri('#' + this.id, this.options)
...
}
It forces user to set id for each component (in case if there are many instances).
Instead we can refer to root element using this.$el
(https://vuejs.org/v2/api/?#mounted):
createGrid () {
this.grid = new Muuri(this.$el, this.options)
...
}
@nikolay-borzov I'll look into this. Feel free to fork the repo if you have any changes. Thank you for the feedback.