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

Feature Request: include "context" in the PrimeReact Menu component #6489

Closed
melloware opened this issue Apr 28, 2024 · 0 comments · Fixed by #6488
Closed

Feature Request: include "context" in the PrimeReact Menu component #6489

melloware opened this issue Apr 28, 2024 · 0 comments · Fixed by #6488
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

Comments

@melloware
Copy link
Member

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, and context.

Let's take a look at the TabMenu for example. It has all three objects. The context, which is of type TabMenuContext, has a property item and a property index. 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?

@melloware melloware transferred this issue from primefaces/community Apr 28, 2024
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 28, 2024
@melloware melloware added Component: Unstyled Issue related to unstyled/passthrough attributes and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Apr 28, 2024
@melloware melloware added this to the 10.6.4 milestone Apr 28, 2024
nitrogenous added a commit that referenced this issue Apr 30, 2024
@mertsincan mertsincan added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants