Quasar: q-drawer-link not getting active class on child routes.

Created on 6 May 2017  Â·  7Comments  Â·  Source: quasarframework/quasar

I have same problem right now. All <q-drawer-link> gets active class only at exact route. <router-link> works normal. Construction with <router-link> chnges page but it go back when I closing drawer on mobile.
This gets active class at '/users/new':

<router-link to="/users" tag="div" class="item item-link drawer-closer">
  <div class="item-content">
    Пользователи
  </div>
</router-link>

but this:

<q-drawer-link to="/users">
  Пользователи
</q-drawer-link>

or this:

<q-drawer-link :to="{path: '/users', exact: false}">
  Пользователи
</q-drawer-link>

don't.
Am I doing something wrong?

All 7 comments

Hi, I would gladly investigate this for v0.13, but the lack of time and v0.14 release date is pressuring me. v0.14 has flawless implementation in all components using routes though. Working hard to release v0.14. Thank you!

=(

@Zolotov88 use your first version:

<router-link to="/users" tag="div" class="item item-link drawer-closer">
  <div class="item-content">
    Пользователи
  </div>
</router-link>

It's perfectly equivalent to what drawer-link should do.

Please help Quasar by supporting it so I can spend even more time developing it. https://www.patreon.com/quasarframework Every cent counts!

This issue must be reopened because "exact" does not work on q-drawer-link and the equivalent is not working in devices where the drawer is hidden.

This has been reworked in v0.14, so it's no longer relevant. All components using routes will work the same way router-link does.

when is v0.14 coming out?

@christosf Hi, you can read all about it here: http://forum.quasar-framework.org/topic/253/future-v0-14-feature-list

Was this page helpful?
0 / 5 - 0 ratings