Skip to content

Commit

Permalink
fix: fix update record modal
Browse files Browse the repository at this point in the history
  • Loading branch information
nichenqin committed Sep 5, 2023
1 parent c4331dd commit 6e4f0a4
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions apps/frontend/src/lib/record/UpdateRecord.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,22 @@
const { form, enhance, delayed, tainted, submitting } = superFrm
const open = writable<boolean>(false)
$: {
$: if ($currentRecordId) {
open.set(!!$currentRecordId)
}
$: if (!$open) {
currentRecordId.set(undefined)
}
const prevRecord = recordsStore.prevRecord
const nextRecord = recordsStore.nextRecord
</script>

<Dialog.Root bind:open={$open}>
<Dialog.Root
bind:open={$open}
onOpenChange={(open) => {
if (!open) {
currentRecordId.set(undefined)
}
}}
>
{#key $record}
<Dialog.Content class="!w-3/4 !max-w-none h-[calc(100vh-64px)] overflow-y-hidden p-0 block gap-0">
<Dialog.Header class="border-b border-gray-100 h-15 p-6">
Expand Down

0 comments on commit 6e4f0a4

Please sign in to comment.