Skip to content

Commit dd50463

Browse files
committed
fix: fix some bug
1 parent 0a15d81 commit dd50463

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

apps/frontend/src/lib/components/blocks/field-value/reference-field.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
export let tableId: string
1010
export let recordId: string | undefined
1111
12-
$: selected = writable<string[]>(value)
12+
$: selected = writable<string[]>(value ?? [])
1313
1414
let hasValue = Array.isArray(value) && value.length > 0
1515
@@ -36,7 +36,7 @@
3636
bind:selected
3737
let:builder
3838
>
39-
{#if hasValue}
39+
{#if hasValueReactive}
4040
<Button size="xs" variant="link" class="px-0" builders={[builder]} on:click={(e) => e.stopPropagation()}>
4141
{value?.length} Linked Records
4242
</Button>

apps/frontend/src/lib/components/blocks/kanban-view/select-kanban-lane.svelte

+8-4
Original file line numberDiff line numberDiff line change
@@ -376,10 +376,14 @@
376376
</div>
377377
<div class="mt-2 flex w-full items-center justify-between px-2 py-0.5">
378378
{#if !shareId}
379-
<Button variant="outline" size="xs" on:click={onCreateRecord}>
380-
<PlusIcon class="text-muted-foreground mr-2 h-3 w-3 font-semibold" />
381-
New Record
382-
</Button>
379+
{#if !(field.required && !option)}
380+
<Button variant="outline" size="xs" on:click={onCreateRecord}>
381+
<PlusIcon class="text-muted-foreground mr-2 h-3 w-3 font-semibold" />
382+
New Record
383+
</Button>
384+
{:else}
385+
<div class="h-6"></div>
386+
{/if}
383387
{/if}
384388

385389
{#if $query.isFetchedAfterMount}

apps/frontend/src/lib/components/blocks/template/template-list-sheet.svelte

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
<script lang="ts">
22
import * as Sheet from "$lib/components/ui/sheet"
3-
import { IMPORT_TEMPLATE_MODAL, isModalOpen, toggleModal, closeModal } from "$lib/store/modal.store"
3+
import { IMPORT_TEMPLATE_MODAL, isModalOpen, closeModal } from "$lib/store/modal.store"
44
import { PackageIcon } from "lucide-svelte"
55
import TemplateList from "./template-list.svelte"
66
</script>
77

8-
<Sheet.Root open={$isModalOpen(IMPORT_TEMPLATE_MODAL)} onOpenChange={(open) => {
9-
if (!open) {
10-
closeModal(IMPORT_TEMPLATE_MODAL)
11-
}
12-
}}>
13-
closeModal(IMPORT_TEMPLATE_MODAL)
14-
}}>
8+
<Sheet.Root
9+
open={$isModalOpen(IMPORT_TEMPLATE_MODAL)}
10+
onOpenChange={(open) => {
11+
if (!open) {
12+
closeModal(IMPORT_TEMPLATE_MODAL)
13+
}
14+
}}
15+
>
1516
<Sheet.Content class="flex h-[85%] flex-col bg-gray-50" side="bottom">
1617
<Sheet.Header>
1718
<Sheet.Title class="flex items-center">

0 commit comments

Comments
 (0)