forked from coracle/flotilla
Replace state when opening a modal from a drawer
This commit is contained in:
+2
-1
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user