I am currently using this Svelte component and I would like to know if anyone knows how the startup can be changed so that it does not open after loading, so that it only opens when pressing a button.
This is the link for the component I am referring to and this is the example in Svelte REPL.
Thank you for your attention.
The answer should be to change
let visible = true
tolet visible = false
. That fails because the component expectsvisible
to be true initially. That seems like a bug, and you should probably raise it on the component's issue tracker.Short of that, you can wrap the whole lot in
{#if visible}
:But that may not have the intended behaviour, since the component will now be recreated every time
visible
becomes true.