Replace state when opening a modal from a drawer

This commit is contained in:
Jon Staab
2024-10-24 14:18:32 -07:00
parent ceb7f3340d
commit 058f1d09d2
4 changed files with 99 additions and 87 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ import {goto} from "$app/navigation"
export type ModalOptions = {
drawer?: boolean
fullscreen?: boolean
replaceState?: boolean
}
export type Modal = {
@@ -28,7 +29,7 @@ export const pushModal = (
modals.update(assoc(id, {id, component, props, options}))
goto("#" + id)
goto("#" + id, {replaceState: options.replaceState})
return id
}