bootstrap-vue / bootstrap-vue

BootstrapVue provides one of the most comprehensive implementations of Bootstrap v4 for Vue.js. With extensive and automated WAI-ARIA accessibility markup.

Home Page:https://bootstrap-vue.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow completely custom trigger elements for dropdown component

ventralnet opened this issue · comments

Describe the bug

Support for non button triggers in bootstrap-vue / dropdown. Specifically my use case is a search input which, after the user types some text shows a dropdown of potential suggested searches.

Steps to reproduce the bug

The current dropdown component will allow you to add 'toggle-classes' and type of trigger element. This gets some of the way there but there are a couple problems.

  1. btn classes are added to the trigger element
  2. Click events trigger open and close with no way for override

Expected behavior

Don't assume the type of the trigger element.. Or allow 'custom-trigger' element that isn't altered. Allow a 'isOpen' prop to open and close the dropdown programatically.

Versions

BootstrapVue 2.x.x

Thoughts? It seems fairly common for dropdown support on non button items. I am currently in the researching phase to upgrade bootstrap. Curranty our app is using the UIV bootstrap library dropdown (Among other components)