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

vue-router: exact mode #1896

Closed
rbayley opened this issue Aug 8, 2018 · 1 comment
Closed

vue-router: exact mode #1896

rbayley opened this issue Aug 8, 2018 · 1 comment

Comments

@rbayley
Copy link

rbayley commented Aug 8, 2018

Hi,

I am rendering a List:

<md-list>
  <md-list-item v-for="(item, section_key) in this.sections" :key="section_key" @click.native='onClick(section_key, $event)' :to="{ name: locale.id + '-' + section_key  }" :exact="false" :active-class="'md-selected'">
    <span class="md-list-item-text">{{ $t( section_key) }}</span>
  </md-list-item>
</md-list>

List is rendered as expected. Issue is with router.

  1. Vue-router states exact prop default value is false. But vue-material makes it true unless specified like I did :exact="false"
    So, we are inverting vue-router natural behaviour. Is my observation correct or am I doing something wrong?

  2. After settting the :exact="false" prop I noticed that the item was not highlighted as it should.
    I noticed that "router-link-exact-active" and "router-link-active" class were not added anymore.
    The way I found to keep it active is by adding :active-class="'md-selected'" as vue-router states

Again, is this correct ?

@VdustR
Copy link
Member

VdustR commented Aug 9, 2018

Vue Router would be fully supported on next release

#1651

@VdustR VdustR closed this as completed Aug 9, 2018
@VdustR VdustR added the next label Aug 9, 2018
@Samuell1 Samuell1 removed the next label Aug 9, 2018
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

3 participants