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.

ability to keep b-dropdown opened when an item is clicked

See original GitHub issue

Because #1569, I’m using such a markup:

<b-button-group>
  <b-dropdown>
     <b-dropdown-item><b-button>Blah</b-button></b-dropdown-item>
     <b-dropdown-item><b-button>Foo</b-button></b-dropdown-item>
   </b-dropdown>
</b-button-group>

But I can’t think of a way to keep <b-dropdown> opened after clicking one of the items.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
tomlankhorstcommented, Feb 12, 2018

As a temporary workaround, I’m replacing <b-dropdown-item> component with a plain anchor with event listener that stops propagation (<a class="dropdown-item" @click.stop="doStuff" href="#">Do</a>).

0reactions
omarjebaricommented, Nov 13, 2021

Use @click.native.capture.stop, eg:

<b-dropdown-item @click.native.capture.stop>text</b-dropdown-item>

Read more comments on GitHub >

github_iconTop Results From Across the Web

Keep Dropdown open when clicked on dropdown item
When clicked on an item with the class "dropdown-item", the dropdown will always close. Currently there's no way to adjust this behaviour. Request....
Read more >
Keep Bootstrap dropdown open on click - Stack Overflow
For me this seems to keep it open if some items are clicked but not all. I have a list of <li>s with...
Read more >
How to avoid dropdown menu to close menu items on clicking ...
In this article, We will use stropPropagation method to prevent the dropdown menu from closing the menu list.
Read more >
Dropdown stay open after click? - Forums - CSS-Tricks
I'd like to click the “Options” dropdown, and be able to click the “colors” item, and have it change colors, but not close...
Read more >
Dropdowns - Bootstrap
However, Bootstrap does add built-in support for most standard keyboard menu interactions, such as the ability to move through individual .dropdown-item ...
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