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

[BUG] Cannot export variabiles of webcomponents attributes with kebab-case syntax #1

Open
ptkdev opened this issue Apr 8, 2021 · 3 comments
Assignees
Labels
bug Something isn't working svelte-bug

Comments

@ptkdev
Copy link
Member

ptkdev commented Apr 8, 2021

Svelte refs:

#3852 #875

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".

@ptkdev ptkdev added bug Something isn't working svelte-bug labels Apr 8, 2021
@ptkdev ptkdev self-assigned this Apr 8, 2021
@veeking
Copy link

veeking commented Oct 12, 2021

Why my result still undefined by $$props ?

@abdolian
Copy link

I have the same problem, please fix this as soon as possible

@ptkdev
Copy link
Member Author

ptkdev commented Oct 12, 2021

@veeking @abdolian
This is svelte issue sveltejs/svelte#3852

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working svelte-bug
Projects
None yet
Development

No branches or pull requests

3 participants