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: duplicated "focusedItemId" in popup mode #6866

Closed
narian opened this issue Nov 26, 2024 · 3 comments
Closed

Menu: duplicated "focusedItemId" in popup mode #6866

narian opened this issue Nov 26, 2024 · 3 comments
Labels
Resolution: Cannot Replicate Issue could not be replicated by Core Team

Comments

@narian
Copy link

narian commented Nov 26, 2024

Describe the bug

Hello,
I'm currently trying to add actions buttons to DataTable, and I took Popup example from menu page and placed it into each row of the DataTable. If I click on any menu first time, it works fine, but every next one give me that warning message.

VActionDropdownMe…?t=1732577479790:50 [Vue warn]: Computed property "focusedOptionId" is already defined in Props. 
  at <Menuitem key=0 id="pv_id_8_0_0" item= 
{label: 'Refresh', icon: 'pi pi-refresh'}
  ... > 
  at <BaseTransition onEnter=fn onLeave=fn<onLeave> onAfterLeave=fn<bound onAfterLeave>  ... > 
  at <Transition name="p-connected-overlay" onEnter=fn<bound onEnter> onLeave=fn<bound onLeave>  ... > 
  at <Portal appendTo="body" disabled=false > 
  at <Menu model= 
[{…}]
 ref="menu" popup=true >

As for the code structure, I basically wrapped Popup example into separate component and pasted into each row of the DataTable with different menu data. It also affects any other "popup" menu on the page. I've tried to changed passed data to/from ref / computed with no results. I've also looked into issue #5054 but no luck yet.

But interestengly, it occurs only when I set :popup="true" on the menu component. If I remove it, warnings magically disappear, even if multiple menus are in the page. I suspect some Portal shenanigans, like it's first pasting newer instance of menu component, before remove older one.

I'll appreciate some advice or possible solution if anyone has an idea. Thanks.

Reproducer

See report

PrimeVue version

3.53.0

Vue version

3.x

Language

ES6

Build / Runtime

Nuxt

Browser(s)

No response

Steps to reproduce the behavior

  1. Click on the action button in random order

Expected behavior

Every menu instance should open without warning.

@narian narian added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 26, 2024
@tugcekucukoglu tugcekucukoglu added this to the 3.54.0 milestone Nov 26, 2024
@tugcekucukoglu tugcekucukoglu added Resolution: Help Wanted Issue or pull request requires extra help and feedback and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 26, 2024
Copy link

Due to PrimeVue team's busy roadmap, this issue is available for anyone to work on. Make sure to reference this issue in your pull request. ✨ Thank you for your contribution! ✨

@tugcekucukoglu tugcekucukoglu removed this from the 3.54.0 milestone Dec 11, 2024
@tugcekucukoglu tugcekucukoglu added Resolution: Cannot Replicate Issue could not be replicated by Core Team and removed Resolution: Help Wanted Issue or pull request requires extra help and feedback labels Dec 11, 2024
Copy link

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

@galaxyblur
Copy link

I am also experiencing this error

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Cannot Replicate Issue could not be replicated by Core Team
Projects
None yet
Development

No branches or pull requests

3 participants