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

TieredMenu: Menu commands in the TieredMenu don't receive any arguments #3391

Closed
jf908 opened this issue Dec 9, 2022 · 5 comments
Closed
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@jf908
Copy link

jf908 commented Dec 9, 2022

Describe the bug

In a typical menu item:

{
  label: "Test",
  command: function(e) {
    console.log(e); // e is undefined
  }
}

The command function receives undefined instead of an object contained the originalEvent and other menu bits.

Reproducer

https://codesandbox.io/s/dry-forest-3zsdh5?file=/src/App.vue

PrimeVue version

3.21.0

Vue version

3.x

Language

ALL

Build / Runtime

Nuxt

Browser(s)

No response

Steps to reproduce the behavior

  1. Create a TieredMenu
  2. Click on one of the TieredMenu items
  3. Print out argument of command to see that it's undefined

Expected behavior

The argument should be the same as Menu, it should be an object that contains the originalEvent.

@jf908 jf908 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 9, 2022
@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 Dec 14, 2022
@tugcekucukoglu tugcekucukoglu added this to the 3.x milestone Dec 14, 2022
@bahadirsofuoglu bahadirsofuoglu removed this from the 3.x milestone Dec 29, 2022
@bahadirsofuoglu bahadirsofuoglu added Resolution: Cannot Replicate Issue could not be replicated by Core Team and removed Type: Bug Issue contains a bug related to a specific component. Something about the component is not working labels Dec 29, 2022
@github-actions
Copy link

We're unable to replicate your issue, if you are able to create a reproducer or add details please edit this issue. This issue will be closed if no activities in 20 days.

@bahadirsofuoglu
Copy link
Contributor

Am I missing something? Could you try again?

@jf908
Copy link
Author

jf908 commented Dec 30, 2022

Apologies, I linked a working version that used <Menu>, I've updated the reproducer to use <TieredMenu>

@Kixell-NicolasJardillier

Hi,

I have the same issue with Menubar
From the example provided by @jf908 replace TieredMenu by :

  • Menu => It works
  • Menubar => It fails, with same error
  • MegaMenu => It fails, with same error

any workaround ?

Best regards

@ThomasLaigneau
Copy link

Hi,

Same error here on MenuBar.

Any idea on how to fix it ?

@bahadirsofuoglu bahadirsofuoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Resolution: Cannot Replicate Issue could not be replicated by Core Team labels Jan 4, 2023
@bahadirsofuoglu bahadirsofuoglu added this to the 3.22.0 milestone Jan 4, 2023
@bahadirsofuoglu bahadirsofuoglu self-assigned this Jan 4, 2023
bahadirsofuoglu added a commit that referenced this issue Jan 5, 2023
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

Successfully merging a pull request may close this issue.

5 participants