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

$$props not updating nested slot #5367

Closed
davidsavoie1 opened this issue Sep 8, 2020 · 2 comments · Fixed by #5375
Closed

$$props not updating nested slot #5367

davidsavoie1 opened this issue Sep 8, 2020 · 2 comments · Fixed by #5375

Comments

@davidsavoie1
Copy link

Describe the bug
A wrapper component exposes a main slot. When providing it with content that itself includes a default slot on which it spreads $$props, those a not reactive.

<Container>
  <div class="input">
    <slot>
      <input type="text" {...$$props} />	
    </slot>
  </div>
</Container>

Logs
No particular logs

To Reproduce
See this REPL example

Expected behavior
The props passed to the wrapper component should be transferred to the default slot.

Information about your Svelte project:
Not specific to browser or OS. Reproduced using latest Svelte 3.24.1.

Severity
Annoying, since I have to find a workaround or explicitely declare every prop that the default slot could get from its wrapper.

Thanks for considering this! I appreciate.

@davidsavoie1
Copy link
Author

Thanks a lot!

@Conduitry
Copy link
Member

This has been fixed in 3.25.0 - https://svelte.dev/repl/3760eaa9aec046d4976bcb35f42f2290?version=3.25.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants