fix(dropdown): Add support for vue router links in dropdown items
What does this MR do?
Add support for vue router links in dropdowns
In order for dropdown items to provide Vue Router support, we must render a dropdown item when the attribute "to" is provided.
Why is this change needed?
<b-dropdown-item>
supports Vue Router's to
. With this change, gitlab-ui will also allow us to link to Vue Router pages using dropdown items.
In practice this means we should be able to do this:
<gl-new-dropdown-item :to="{ name: PANEL_NEW_PAGE }">
New Panel
</gl-new-dropdown-item>
See: https://bootstrap-vue.org/docs/components/dropdown#comp-ref-b-dropdown-item
Use Case
- ~"group::apm" use case for this is at gitlab#235188 (closed)
Does this MR meet the acceptance criteria?
Conformity
-
Code review guidelines. -
GitLab UI's contributing guidlines. - [-] If it changes a Pajamas-compliant component's look & feel, the MR has been reviewed by a UX designer.
- [-] If it changes GitLab UI's documentation guidelines, the MR has been reviewed by a Technical Writer.
-
If the MR changes a component's API, integration MR(s) have been opened in the following projects to ensure that the @gitlab/ui
package can be upgraded quickly after the changes are released:-
GitLab: gitlab!39191 (closed) -
Customers Portal: mr_url -
Status Page: mr_url
-
-
Added the ~"component:*"
label(s) if applicable.
Edited by Miguel Rincon