8000 Introduce the b-nav-item-toggle component that works with v-b-toggle · Issue #5391 · bootstrap-vue/bootstrap-vue · GitHub
[go: up one dir, main page]

Skip to content
Introduce the b-nav-item-toggle component that works with v-b-toggle #5391
Closed
@thebspin

Description

@thebspin

Is your feature request related to a problem? Please describe...

Working with a vertical b-nav component i want to have options that are hidden by a toggle.
I found the v-b-toggle directive but that does not work with the b-nav-item component.
You can work around that using the b-nav-text component instead. That however comes without the styling of a nav item.
I could also go for a v-model solution or a method based solution but that's more lines of code, less flexible and defeats the purpose of the directive itself.

I understand this is because the b-nav-item component works with evt.preventDefault().

Describe the solution you'd like

If there would be an b-nav-item-toggle component that would be expected to be used with the directive, then you would no longer need the preventDefault() check and i could do something like:

<b-nav-item-toggle v-b-toggle.secret>Dropdown</b-nav-item>
<b-collapse id="secret">
    <b-nav-item>Do you see me?</b-nav-item>
</b-collapse>

And there would be no need for v-model and thus data opbjects or a method.

Describe alternatives you've considered

An alternative could be that the b-nav-text component could be styled to look like the b-nav-item

I think vertical navbar's would greatly benefit from this (and thusfor makes it easier to make admin themes, something i have not found using this otherwise great framework)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0