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

Use this.$el to initialize grid

Open nikolay-borzov opened this issue 6 years ago • 1 comments

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 avatar Nov 01 '17 08:11 nikolay-borzov

@nikolay-borzov I'll look into this. Feel free to fork the repo if you have any changes. Thank you for the feedback.

jocodev1 avatar Nov 01 '17 10:11 jocodev1