primereact icon indicating copy to clipboard operation
primereact copied to clipboard

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

Open sweco-dkhmaa opened this issue 2 months ago • 0 comments

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.

sweco-dkhmaa avatar Nov 20 '25 08:11 sweco-dkhmaa