-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an href property to b-nav-item-dropdown #3942
Comments
An |
It looks like the framework I'm using (Nuxt.js) is inserting a https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base In any case, it would still be useful in my app to be able to set the href property to make sure that when people click it before the javascript is loaded, the correct page loads (which isn't the current page in most cases). This probably isn't a common use case but I thought I'd throw it out there in case other people would find it useful. |
Perhaps, we couldswitch to using |
Or if a router is detected, we could default it to the current |
The other option is to see if we can render a button instead of a link with href="#" (although it might require some additional SCSS). One other option, might be to render a |
…e link (closes #3942) (#5344) * fix(b-nav-item-dropdown): let `<b-link>` handle `href` default * Update nav-item-dropdown.js * Update nav-item-dropdown.spec.js * Update nav-item-dropdown.js * Update nav-item-dropdown.js * Update id.js * Update nav-item-dropdown.js * Update nav-item-dropdown.spec.js * Update nav-item-dropdown.spec.js * Update README.md * Update nav-item-dropdown.spec.js * Update nav-item-dropdown.js * Update nav-item-dropdown.spec.js * Update nav-item-dropdown.spec.js * Update nav-item-dropdown.spec.js * Update README.md * Update nav-item-dropdown.js * Update nav-item-dropdown.spec.js Co-authored-by: Troy Morehouse <troymore@nbnet.nb.ca>
@scyclops in release v2.14.0 the toggle |
Is your feature request related to a problem? Please describe...
Before the javascript has loaded, clicking on the b-nav-item-dropdown causes the page to change and there's no way to control what page the b-nav-item-dropdown goes to because it's hardcoded to '#'.
Describe the solution you'd like
Have b-nav-item-dropdown support a new href property that would allow changing the href while keeping the default as '#'.
The href value of '#' is hardcoded here:
bootstrap-vue/src/components/nav/nav-item-dropdown.js
Line 48 in 21fab35
The text was updated successfully, but these errors were encountered: