We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We cannot use slot prop in custom components, this messes up components that work with flexbox and other tools that depend on component structure.
<p> I need to be directly a child of ParentComponent.svelte</p>
<div> <slot name="child" /> <div class="content"><slot/></div> </div>
import ChildComponent from "ChildComponent.svelte"; import ParentComponent from "ParentComponent.svelte";
<ParentComponent> <div slot="child"> <ChildComponent /> </div> This is the content </ParentComponent>
This is the output
<div> <div> <p> I need to be directly a child of ParentComponent.svelte</p> </div> <div class="content"> This is the content </div> </div>
As you can see the <p> tag is not a direct child. I propose that slot be a reserved keyword and can used by any component.
<p>
The text was updated successfully, but these errors were encountered:
I have a feeling that this is covered by the one of the slots proposals, but I could be wrong. @tanhauhau can you clarify?
Sorry, something went wrong.
I'm pretty sure #4556 would take care of this.
Yeah duplicate of #1037 and #2080 and probably some other issues. This would be handled by something like #4556.
tanhauhau
No branches or pull requests
We cannot use slot prop in custom components, this messes up components that work with flexbox and other tools that depend on component structure.
ChildComponent.svelte
ParentComponent.svelte
App.svelte
This is the output
As you can see the
<p>
tag is not a direct child. I propose that slot be a reserved keyword and can used by any component.The text was updated successfully, but these errors were encountered: