DesignRevision / shards-vue

🌟Shards Vue is a free, beautiful and modern Vue.js UI kit based on Shards.
https://designrevision.com/docs/shards-vue/
MIT License
393 stars 40 forks source link

Exact prop does not work on d-nav-item #10

Closed simioluwatomi closed 5 years ago

simioluwatomi commented 5 years ago

Expected Behavior

The d-nav-item with an :exact prop should not have an active class when it is not the current active route

Current Behavior

Even after applying the active prop to a d-nav-item, an active class is always applied to it as long as the current path is preceeded by the path of the d-nav-item with the exact prop.

<d-collapse is-nav id="nav-collapse" class="justify-content-md-center">
    <d-navbar-nav>
        <d-nav-item to="/" exact>Home</d-nav-item>
        <d-nav-item to="/portfolio">Portfolio</d-nav-item>
        <d-nav-item to="/stocks">Stocks</d-nav-item>
        <d-nav-item to="">End Day</d-nav-item>
        <d-dropdown text="Save & Load" is-nav>
            <d-dropdown-item>Action</d-dropdown-item>
            <d-dropdown-item>Another action</d-dropdown-item>
            <d-dropdown-item>Something else here</d-dropdown-item>
            <d-dropdown-divider />
            <d-dropdown-item>Separated link</d-dropdown-item>
        </d-dropdown>
    </d-navbar-nav>
</d-collapse>
export default new Router({
    linkActiveClass: 'active',
    linkExactActiveClass: 'exact-active',
   // more router options
})

Result

untitled

hisk commented 5 years ago

@simioluwatomi I apologize for the delay! Also, thank you for taking the time to submit this. 😊

I managed to reproduce this issue on my end and I am working on a fix. Expect an update soon. 😁

simioluwatomi commented 5 years ago

@hisk you don't need to apologise for anything... I'll be waiting for that fix!!!!

hisk commented 5 years ago

@simioluwatomi This issue has been fixed in 1.0.5. Thanks for your patience! πŸ˜„