primefaces / primefaces/primereact

TieredMenu: MenuItem className is not passed to DOM in unstyled mode

Open
#8,399 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Status: Needs Triage
Dominant language
CSS
Stars
8.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

The className Property of MenuItem is not passed to TieredMenu DOM, when running PrimeReact in unstyled mode.

Reproducer

https://codesandbox.io/p/sandbox/qqzps9

System Information
System:
    OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (2) x64 AMD EPYC
    Memory: 2.47 GB / 4.01 GB
    Container: Yes
    Shell: Unknown
  Binaries:
    Node: 20.9.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.8.1 - /usr/local/bin/npm
    pnpm: 8.10.2 - /usr/local/share/npm-global/bin/pnpm
  npmPackages:
    primereact: 10.9.7 => 10.9.7 
    react: 19.2.0 => 19.2.0
Steps to reproduce the behavior
  • Wrap a TieredMenu component inside a PrimeReactProvider with unstyled set to true.
  • Create a MenuItem with the className property set
  • Give the MenuItem to the TieredMenu
  • Observe the className value is not passed to the generated MenuItem element
Expected behavior

Would expect the className property to be passed to the generated element, even in unstyled mode.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the TieredMenu component entry point and reproduce the issue using the linked CodeSandbox with PrimeReactProvider unstyled mode and a MenuItem className. Trace the generated MenuItem element and confirm done when the supplied className appears in the DOM while unstyled mode remains enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
react
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.