Skip to content

Commit

Permalink
preserve frames through navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
buhrmi committed Sep 8, 2023
1 parent 469d923 commit 90571dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/svelte/src/Frame.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
setContext('inertia:frame-id', id)
$: components = $store.frames?.[id] && h($store.frames[id].component.default, $store.frames[id].props)
onMount(() => {
router.visit(src, {
target: id
Expand Down
1 change: 1 addition & 0 deletions packages/svelte/src/createInertiaApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default async function createInertiaApp({ id = 'app', resolve, setup, pro
else store.update((current) => ({
component,
page,
frames: current.frames,
key: preserveState ? current.key : Date.now(),
}))
},
Expand Down

0 comments on commit 90571dd

Please sign in to comment.