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

Attaching Data Attributes to a Component Instance #4

Open
willclark opened this issue Dec 14, 2017 · 1 comment
Open

Attaching Data Attributes to a Component Instance #4

willclark opened this issue Dec 14, 2017 · 1 comment

Comments

@willclark
Copy link

In our Rails app, we utilize a number of Vue components for various controls. In some of those components we slot in a Rails generated form. When we do so, the dynamic data attributes are attached to the root Vue instance.

Is it possible to have the attributes attached to the Vue component instance instead?

It would be nice to not have to reach up to the root to get the data. More importantly, we would like to avoid naming collisions if a given view has initialized several instances of the same component.

@kuroda
Copy link
Owner

kuroda commented Dec 14, 2017

The answer is no.

Currently, this plugin works as a global mix-in so that it affects all Vue instances.

I would like to think about this.

Thank you for your valuable suggestions.

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

No branches or pull requests

2 participants