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

Menu section: PassThrough context.item has not right MenuItem entry #6055

Closed
NicolaiHorlacher opened this issue Jul 12, 2024 · 1 comment
Closed
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@NicolaiHorlacher
Copy link

NicolaiHorlacher commented Jul 12, 2024

Describe the bug

The TieredMenu component doesn't have the right context.item set in the PassThroughMethodOptions.

In the example I try to set a data-testid with the PassThrough functionality based on the id field of the MenuItems.
This behavior works with the Menu component, but not with the TieredMenu component.

To illustrate the issue I gave every element with a data-testid a orange border.

Curiously if I use context.item.item to access the data it works fine.

Reproducer

https://stackblitz.com/edit/primevue-4-ts-vite-issue-template-wrnwmq?file=src%2FApp.vue

PrimeVue version

4.0.0

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

TieredMenu should have the same behavior as Menu.

@NicolaiHorlacher NicolaiHorlacher added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jul 12, 2024
@NicolaiHorlacher NicolaiHorlacher changed the title TieredMenu: PassThrough context.item is empty TieredMenu: PassThrough context.item has not right MenuItem entry Jul 12, 2024
@frandmb
Copy link

frandmb commented Aug 6, 2024

Looks like this is also the case with the props property under [Component]PassThroughMethodOptions. The same incorrect pt type definitions for context and props seems to happen in many (if not all) components.

@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Aug 22, 2024
@tugcekucukoglu tugcekucukoglu added this to the 4.0.5 milestone Aug 22, 2024
@tugcekucukoglu tugcekucukoglu self-assigned this Aug 22, 2024
@tugcekucukoglu tugcekucukoglu changed the title TieredMenu: PassThrough context.item has not right MenuItem entry Menu section: PassThrough context.item has not right MenuItem entry Aug 22, 2024
LeaderbotX400 pushed a commit to LeaderbotX400/primevue that referenced this issue Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

3 participants