Feature Request: include "context" in the PrimeReact Menu component #6489
Labels
Component: Unstyled
Issue related to unstyled/passthrough attributes
Type: Enhancement
Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone
Discussed in https://github.com/orgs/primefaces/discussions/1728
Originally posted by peconomou929 April 21, 2024
All PrimeReact components have the so-called "Pass Through Method Options" which include a subset of the following three objects:
props
,state
, andcontext
.Let's take a look at the
TabMenu
for example. It has all three objects. Thecontext
, which is of typeTabMenuContext
, has a propertyitem
and a propertyindex
. This allows you to query each tab item individually in the pass through options, and as a result, give each tab its own styles. For example, we can make the selected tab look different from the rest.This is not the case with the PrimeReact Menu. There is no
context
in the Pass Through Method Options. Hence, there is no way to apply different styles to the different menu items (without creating your own custom JavaScript solution which targets certain elements at run time). This would be useful if I wanted to show a particular menu item as being "selected" (much like a selected tab in a TabMenu).Could we therefore add a
context
to the PrimeReact Menu component?The text was updated successfully, but these errors were encountered: