primereact icon indicating copy to clipboard operation
primereact copied to clipboard

TieredMenu appears broken? - "ReferenceError: item is not defined" even on your own demo page

Open jimmydivvy opened this issue 2 years ago • 0 comments

Describe the bug

When using TieredMenu, the exception ReferenceError: item is not defined occurs and rendering fails. This occurs with any configuration of TieredMenu, including the live demo on your website.

The issue appears to be due to a typo here - https://github.com/primefaces/primereact/commit/8a0bc9c132842235af541a940d97747d49abe1a5#diff-e991966308dcf3a94656ebea8621e8de752678b5dec5e9376d228f350406756cR138

Specifically

ariaLabelledby: getItemId(item)

Looks like it should instead be

ariaLabelledby: getItemId(processedItem)

Reproducer

https://primereact.org/tieredmenu/

PrimeReact version

10.3.0

React version

18.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

This issue is currently observable on your own demo page - https://primereact.org/tieredmenu. The example tiered menu does not render and the console displays the error ReferenceError: item is not defined

Expected behavior

A tiered menu is rendered with no exceptions

jimmydivvy avatar Jan 10 '24 10:01 jimmydivvy