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

Use this.$el to initialize grid #3

Open
nikolay-borzov opened this issue Nov 1, 2017 · 1 comment
Open

Use this.$el to initialize grid #3

nikolay-borzov opened this issue Nov 1, 2017 · 1 comment

Comments

@nikolay-borzov
Copy link

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 nikolay-borzov changed the title Use this.$el to initialize grid Use this.$el to initialize grid Nov 1, 2017
@jocodev1
Copy link
Owner

jocodev1 commented Nov 1, 2017

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

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

2 participants