Accordion, Button, Step, Tab: Invalid prop warnings when component object passed to as
prop
#6266
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
The below components all accept an
as
prop that allow the HTML to be rendered optionally as a specific component. This prop however is only configured with typestring
so when a component is directly passed to it as an object, the console is flooded with the warning:[Vue warn]: Invalid prop: type check failed for prop "as". Expected String with value "[object Object]", got Object
.The functionality works regardless, but the warnings are distracting especially when debugging other issues in development so updating the prop to also allow
Component
type fromvue
(as the underlyingcomponent
itself does) should fix the issue.Affected components
Reproducer
https://stackblitz.com/edit/primevue-nuxt-issue-template-9rgq7g?file=app.vue
PrimeVue version
4.0.4
Vue version
4.x
Language
ALL
Build / Runtime
Nuxt
Browser(s)
No response
Steps to reproduce the behavior
as
prop in any of the above mentioned componentsExpected behavior
A component object can be directly passed to the
as
prop without warning.The text was updated successfully, but these errors were encountered: