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

Suggestion: Use directive binding to pass masonry options #65

Open
wonyeouuu opened this issue Jun 4, 2018 · 3 comments
Open

Suggestion: Use directive binding to pass masonry options #65

wonyeouuu opened this issue Jun 4, 2018 · 3 comments
Labels

Comments

@wonyeouuu
Copy link

Hi @shershen08 , this is a good module and I really appreciate your good work.

I think this module can be further improved with passing masonry options with vue directive binding. With the current implementation, options passed into masonry can only be interpreted as strings (e.g. setting :gutter="10" on the template will not work since it's interpreted as '10' but not 10).

I've forked your repo into my own repository and probably figured out how to achieve this. However, this will cause breaking changes in the original API, for example:

// .vue
export default {
  data () {
    return {
      config: { itemSelector: '.item', gutter: 10 },
    }
  },
}

// template
<div v-masonry='config' />

How do you think? Thanks!

@shershen08
Copy link
Owner

shershen08 commented Jun 6, 2018

yes, I know about this option to pass props @wonyeouuu thank's for bringing it in

I was thinking of creating a new major release version say 1.0.0 that would include this and several other changes:

By doing this users of the current 0.x version won't be affected that bad (in case of proper version set in package.json)

I'll ping you as soon as I have it

@LepuavkoDV
Copy link

any updates?

@ux-engineer
Copy link

Yep?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants