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

ContextMenu "template" prop type error #1688

Closed
ga676005 opened this issue Oct 22, 2021 · 0 comments
Closed

ContextMenu "template" prop type error #1688

ga676005 opened this issue Oct 22, 2021 · 0 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@ga676005
Copy link

ga676005 commented Oct 22, 2021

I'm submitting a ... (check one with "x")

[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primevue/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=110

CodeSandbox Case (Bug Reports)
Please demonstrate your case at CodeSandbox by using the issue template below. Issues without a test case have much less possibility to be reviewed in detail and assisted.

https://codesandbox.io/s/nice-flower-47moy?file=/src/ContextMenuDemo.vue

Current behavior
When using <template #item="{item}"> in <ContextMenu>, it will throw warning

[Vue warn]: Invalid prop: type check failed for prop "template". Expected Object, got Function

Expected behavior
Should not throw warning

Minimal reproduction of the problem with instructions
Open context demo on https://primefaces.org/primevue/showcase/#/contextmenu
Copy the code in Templating section from the docoument and Paste it to the demo.

<ContextMenu :model="items">
    <template #item="{item}">
        <a :href="item.url">{{item.label}}</a>
    </template>
</ContextMenu>

Now It will throw warning when menu is opened
This is a similar issue to #1638 which has been resolved
34d6fc9

  • Vue version: 3.2.20

  • PrimeVue version: 3.8.1

  • Browser: [Microsoft Edge 94.0.992.50]

@tugcekucukoglu tugcekucukoglu changed the title ContextMenu with Templating throw 'type check failed for prop "template"` ContextMenu "template" prop type error Oct 22, 2021
@tugcekucukoglu tugcekucukoglu added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Oct 22, 2021
@tugcekucukoglu tugcekucukoglu added this to the 3.8.2 milestone Oct 22, 2021
@tugcekucukoglu tugcekucukoglu self-assigned this Oct 22, 2021
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

2 participants