-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Forwarding slots #1824
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
Comments
I think this idea got absorbed into the other composition improvements. |
This issue can be closed |
Is there today a workaround/hack to implement this kind of forwarding ? I am trying to implements this usecase (a generic lazy loader component which forwards slots/events to the "real" component). |
i think this is still not precisely working as of svelte 3 https://svelte.dev/repl/d329e911978c4d7f89fc991b66fe9a91?version=3.38.2 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I think we can close this now that Svelte 5 has snippets |
Not sure what the best way to frame this problem is, but: there currently needs to be a one-to-one (or one-to-zero) correspondence between slots in a child component, and slotted elements in the parent component, otherwise content goes missing. In some situations, that's a problem: REPL
Say we had a
<Modal>
component with a<slot></slot>
and a<slot name="header"></slot>
. If we wanted to lazily load that with a<Lazy>
component whose implementation looked like this......there's no way to 'forward' that
header
content.The text was updated successfully, but these errors were encountered: