question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

b-dropdown-item with 'to' prop always 'active'

See original GitHub issue

In my project, I have the exact same navbar as here: https://jsfiddle.net/6boedp9t/

The dropdown items are active and I can’t make them inactive. :active="false" doesn’t change anything. I have no idea why, since the fiddle doesn’t reproduce the problem. Any idea?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
tmorehousecommented, Sep 22, 2017

Bootstrap-Vue doesn’t directly apply the active class (unless you are using v-b-scrollspy), but Vue-Router is responsible for placing the active class based on the pages URL and the machting scheme of the route to the URL.

Try adding the router-link ‘exact’ prop to your dropdown items (https://bootstrap-vue.js.org/docs/reference/router-links)

0reactions
alsciendecommented, Sep 23, 2017

Thank you, I didn’t know about this feature of vue-router. All that was missing was the exact prop.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dropdown | Components - BootstrapVue
Turn your dropdown menu into a drop-right menu by setting the dropright prop. Or, turn it into a drop-left menu by setting the...
Read more >
Dynamically render Bootstrap Vue Dropdown elements
I would like to dynamically render different elements: item, title, and divider. How can I do this? So what I want to achieve...
Read more >
Dropdown | Buefy
While it appear as a modal for tablet and smartphones, Dropdowns with hoverable prop won't change it's behavior to avoid any malfunction with...
Read more >
Dropdowns | React-Bootstrap
On the other hand, Bootstrap's dropdowns are designed to more generic and ... Provide a title prop and some <DropdownItem> s and you're...
Read more >
Vue-Multiselect | Vue Select Library
:close-on-select="false" – the dropdown stays open after selecting an option; :show-labels="false" – the highlighted option doesn't have a label on it. Single ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found