[BUG] Cannot export variabiles of webcomponents attributes with kebab-case syntax
ptkdev opened this issue · comments
Patryk Rzucidło commented
Svelte refs:
Example
HTML:
<my-component header-text="hello"></my-component>
Svelte file:
<svelte:options tag="my-component" />
<script>
export let headerText;
</script>
<div>
{headerText}
</div>
<style lang="scss">
</style>
headerText
is undefined.
Workaround:
You can use {$$props["header-text"]}
but if user change the html attribute, svelte, don't re-render html and webcomponent show always "hello".
King Wang commented
Why my result still undefined by $$props ?
Masood Abdolian commented
I have the same problem, please fix this as soon as possible
Patryk Rzucidło commented
@veeking @abdolian
This is svelte issue sveltejs/svelte#3852