Skip to content

Support setting the active-class attribute for <router-link> to an empty string to prevent setting a class. #1314

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

Closed
lehni opened this issue Apr 7, 2017 · 2 comments

Comments

@lehni
Copy link

lehni commented Apr 7, 2017

What problem does this feature solve?

I would like to prevent the setting of the class attribute on a router-link component. Setting it to an empty string has no effect, I have to set it to " " currently to prevent the class being set.

What does the proposed API look like?

e.g.:

<router-link tag="button" to=".." active-class="" append>Cancel</router-link>
@posva
Copy link
Member

posva commented Apr 8, 2017

why do you need this? You could set it to an unused class if it's about styling purposes

@lehni
Copy link
Author

lehni commented Apr 8, 2017

In the example I am creating a <button>, and I thought it was strange that it would receive the same styling that I had already defined for the other router-link elements, so I tried to deactivate it. It's not a big deal, I'm using a.router-link-active for the other styling now so it does not clash any longer, but I was a bit surprised that this wouldn't work.

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