We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When the Menu's model data is fetched through an API call before executing the show function, it causes event.currentTarget to be null.
event.currentTarget
Could we support passing a target parameter to the show function, similar to how the Popover component's show function works?
<script setup> const menu = ref(); const items = ref(); const toggle = async (event: MouseEvent) => { const [data, _] = await Promise.all([ () => [ { label: 'Options', items: [ { label: 'Refresh', icon: 'pi pi-refresh' }, { label: 'Export', icon: 'pi pi-upload' } ] } ], sleep(1000),//Simulate asynchronous requests ]) items.value = data menu.value.toggle(event);//event.currentTarget is null }; </script> <template> <div class="card flex justify-center"> <Button type="button" icon="pi pi-ellipsis-v" @click="toggle" aria-haspopup="true" aria-controls="overlay_menu" /> <Menu ref="menu" id="overlay_menu" :model="items" :popup="true" /> </div> </template> </style>
The text was updated successfully, but these errors were encountered:
same issue
Sorry, something went wrong.
show
toggle
Hmmm...
🤣 Another solution is:
Successfully merging a pull request may close this issue.
When the Menu's model data is fetched through an API call before executing the show function, it causes
event.currentTarget
to be null.Could we support passing a target parameter to the show function, similar to how the Popover component's show function works?
The text was updated successfully, but these errors were encountered: