Skip to content

Commit

Permalink
fix(MenuItem): router link to computed href (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpntex authored Apr 12, 2024
1 parent fc3cfad commit 50c7cf9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/famous-glasses-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@indielayer/ui": patch
---

fix(MenuItem): router link to computed href
6 changes: 4 additions & 2 deletions packages/ui/src/components/menu/MenuItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,11 @@ const { styles, classes, className } = useTheme('MenuItem', {}, computedProps, {
<component
:is="htmlTag"
ref="elRef"
v-bind="computedProps.attrs"
v-bind="{
...(computedProps.href ? { href: computedProps.href } : {}),
...computedProps.attrs,
}"
:to="computedProps.to"
:href="computedProps.href || computedProps.to || ''"
:target="computedProps.target"
:color="computedProps.color"
:style="styles"
Expand Down

0 comments on commit 50c7cf9

Please sign in to comment.