Skip to content

Event when the slot changes from fallback to passed content #5304

@icalvin102

Description

@icalvin102

As the title says: I'm searching for a event that triggers when the slot changes from fallback to passed content and vice versa.

https://svelte.dev/repl/d4c9910e42b045a6aabdd07eadbe8cb9?version=3.24.1

So I tried to build a hacky workaround (see link above) to pass a prop from a fallback component (onMount/dismount) to
the parent component with the slot.
But the problem with this script is that an {#if} block is seen as non-empty by the slot even though the condition is false
and no output is passed to the slot.

Is this by design or is this a bug?

And is there a way to get a event and/or state of a slot?

Thanks :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions