Closed thisispete closed 2 years ago
Are you by any chance passing openModal
to an on:click
instead of a handler function?
If not, can you reproduce this in a Svelte REPL? You can base it off this one
yep on:click
seeing it open if I use
onMount(() => {
openModal(Modal, { title: "Alert", message: "This is an alert" })
})
oh, I see, my bad, I had on:click={openModal}
should be on:click={handleClick}
const handleClick = () => {
openModal(Modal, { title: "Alert", message: "This is an alert" })
}
getting an error on opening modals,
Using the example from the repo, it looks like it's trying to create the Modal but it's getting a PointerEvent instead of the modal class definition?
Svelte-modals 1.1 Svelte 3.48 SvelteKit 1.0.0-next.326