From 2ea202dcef6c9f47ab9b872661039f0814d34c94 Mon Sep 17 00:00:00 2001 From: nichenqin Date: Fri, 23 Aug 2024 16:21:15 +0800 Subject: [PATCH] fix: fix bug --- .../blocks/grid-view/editable-cell/reference-cell.svelte | 3 +++ .../blocks/reference/foreign-records-picker-dropdown.svelte | 1 - packages/persistence/src/abstract-qb.visitor.ts | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/frontend/src/lib/components/blocks/grid-view/editable-cell/reference-cell.svelte b/apps/frontend/src/lib/components/blocks/grid-view/editable-cell/reference-cell.svelte index 20c287b3d..fc0f377e2 100644 --- a/apps/frontend/src/lib/components/blocks/grid-view/editable-cell/reference-cell.svelte +++ b/apps/frontend/src/lib/components/blocks/grid-view/editable-cell/reference-cell.svelte @@ -16,6 +16,9 @@ $: selected = writable(value) let hasValue = Array.isArray(value) && value.length > 0 + + $: selected, (hasValue = Array.isArray(value) && value.length > 0) + $: hasValueReactive = Array.isArray($selected) && $selected.length > 0 $: if (hasValue && !hasValueReactive) { hasValue = hasValueReactive diff --git a/apps/frontend/src/lib/components/blocks/reference/foreign-records-picker-dropdown.svelte b/apps/frontend/src/lib/components/blocks/reference/foreign-records-picker-dropdown.svelte index 432d2544c..15e717693 100644 --- a/apps/frontend/src/lib/components/blocks/reference/foreign-records-picker-dropdown.svelte +++ b/apps/frontend/src/lib/components/blocks/reference/foreign-records-picker-dropdown.svelte @@ -5,7 +5,6 @@ import { readable, writable } from "svelte/store" import { ReferenceField, TableCreator } from "@undb/table" import Button from "$lib/components/ui/button/button.svelte" - import { Skeleton } from "$lib/components/ui/skeleton" import { LoaderCircleIcon } from "lucide-svelte" export let isSelected = false diff --git a/packages/persistence/src/abstract-qb.visitor.ts b/packages/persistence/src/abstract-qb.visitor.ts index d59e5e159..76d557615 100644 --- a/packages/persistence/src/abstract-qb.visitor.ts +++ b/packages/persistence/src/abstract-qb.visitor.ts @@ -75,6 +75,7 @@ export abstract class AbstractQBVisitor implements IAbastractQBVisitor, ISpec spec.accept(v) v.setIsNot(false) + this.addCond(v.cond) return this }