1717
1818 <component
1919 :is =" component"
20+ v-bind =" componentAttrs"
2021 tabindex =" -1"
2122 :class =" [styles.menuItem, {[styles.modifiers.selected]: effectiveSelected && !check}]"
2223 :aria-current =" ariaCurrent"
2728 :aria-disabled =" component === 'a' && disabled ? disabled : undefined"
2829 :aria-expanded =" onPath || flyoutVisible || undefined"
2930 :type =" component === 'button' ? 'button' : undefined"
31+ :target =" component === 'a' ? target : undefined"
32+ :referrerpolicy =" component === 'a' ? referrerpolicy : undefined"
3033 :download =" component === 'a' ? download : undefined"
3134 @click =" !check && onClick($event)"
3235 >
@@ -114,6 +117,8 @@ export interface Props extends OUIAProps, /* @vue-ignore */ Omit<LiHTMLAttribute
114117 loading? : boolean ;
115118 /** Component used to render the menu item */
116119 component? : string ;
120+ /** Additional attrs added to the link component */
121+ componentAttrs? : Omit <ButtonHTMLAttributes , ' href' | ' aria-current' | ' disabled' | ' role' | ' for' | ' aria-disabled' | ' aria-expanded' | ' type' | ' download' | ' onClick' > | Omit <AnchorHTMLAttributes , ' href' | ' aria-current' | ' disabled' | ' role' | ' for' | ' aria-disabled' | ' aria-expanded' | ' type' | ' download' | ' onClick' | ' target' | ' referrerpolicy' >;
117122 /** Render item as disabled option */
118123 disabled? : boolean ;
119124 /** Description of the menu item */
@@ -132,12 +137,16 @@ export interface Props extends OUIAProps, /* @vue-ignore */ Omit<LiHTMLAttribute
132137 onPath? : boolean ;
133138 /** Navigation link download. Only set when the to property is present. */
134139 download? : string ;
140+ /** Navigation link target. */
141+ target? : string ;
142+ /** Navigation link referrerpolicy. */
143+ referrerpolicy? : AnchorHTMLAttributes [' referrerpolicy' ];
135144}
136145 </script >
137146
138147<script lang="ts" setup>
139148import styles from ' @patternfly/react-styles/css/components/Menu/menu' ;
140- import { computed , getCurrentInstance , inject , provide , ref , type ComputedRef , type InjectionKey , type Ref , type LiHTMLAttributes } from ' vue' ;
149+ import { computed , getCurrentInstance , inject , provide , ref , type ComputedRef , type InjectionKey , type Ref , type LiHTMLAttributes , type ButtonHTMLAttributes , type AnchorHTMLAttributes } from ' vue' ;
141150import { getUniqueId } from ' ../../util' ;
142151import { MenuInjectionKey , MenuItemsKey , type MenuItemId } from ' ./Menu.vue' ;
143152import PfCheckbox from ' ../Checkbox.vue' ;
0 commit comments