-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Labels
Description
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...
{#await loader() then mod}
<svelte:component this={mod.default} on:close {...props}>
<slot></slot>
</svelte:component>
{/await}
<script>
export default {
computed: {
props: ({ loader, ...props }) => props
}
};
</script>
...there's no way to 'forward' that header
content.
outerlook and grin