Skip to content
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

Menu: 'class' prop doesnt' work in submenuheader #4622

Closed
bunomonteiro opened this issue Oct 16, 2023 · 0 comments
Closed

Menu: 'class' prop doesnt' work in submenuheader #4622

bunomonteiro opened this issue Oct 16, 2023 · 0 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@bunomonteiro
Copy link

Describe the bug

The submenuheader slot on Menu uses MenuItem object, but the prop class is ignored.

Reproducer

https://codesandbox.io/p/sandbox/exciting-golick-jkw6vh

PrimeVue version

3.36.0

Vue version

3.x

Language

ALL

Build / Runtime

Nuxt

Browser(s)

No response

Steps to reproduce the behavior

<template>
  <Menu :model="items" />
</template>

<script setup>
import { ref } from "vue";

const items = ref([
  { 
    label: 'Item 1',
    class: 'some-submenu-header-class',
    items: [{ 
      label: 'Item 1.1', 
      class: 'some-submenu-item-class'
    }]
  }
]);
</script>

Expected behavior

I expect the submenu header to have the class "some-submenu-header-class" just like the submenu item has the class "some-submenu-item-class"

<ul class="p-menu-list p-reset" role="menu" tabindex="0" data-pc-section="menu">
  <li class="p-submenu-header some-submenu-header-class" role="none" data-pc-section="submenuheader">
    Item 1
  </li>
  <li class="p-menuitem some-submenu-item-class" role="menuitem" aria-label="Item 1.1" data-pc-section="menuitem">
    Item 1.1
  </li>
</ul>
@bunomonteiro bunomonteiro added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Oct 16, 2023
@bunomonteiro bunomonteiro changed the title Menu: 'class' prop doesnt' work on submenuheader Menu: 'class' prop doesnt' work in submenuheader Oct 16, 2023
@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Oct 17, 2023
@tugcekucukoglu tugcekucukoglu added this to the 3.37.0 milestone Oct 17, 2023
@tugcekucukoglu tugcekucukoglu self-assigned this Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants