Vue Web Component converts all props into string #9514
Unanswered
onurusluca
asked this question in
Help/Questions
Replies: 1 comment
-
I have the same issue. I noticed that properties with multi-word names in kebab case (like Am I doing something wrong or is this the expected behavior? @onurusluca have you found a solution for your issue? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! I am making a web component to be embedded inside another website.
Problem is that even though I set the
search-on-load
as boolean, I get it as string. Happens with numbers too.Error:
[Vue warn]: Invalid prop: type check failed for prop "searchOnLoad". Expected Boolean, got String with value "true".
Vue docs says this should work:
https://vuejs.org/guide/extras/web-components.html#props
Web component usage:
Props:(SearchBox.vue)
Web Component definitions:(main.ts)
Web Component settings(vite.config):
I believe this to be an internal bug? If there is no solutions I will make this into an issue.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions