diff --git a/packages/bbui/src/Table/CellRenderer.svelte b/packages/bbui/src/Table/CellRenderer.svelte
index 9a53fd0169..844501947f 100644
--- a/packages/bbui/src/Table/CellRenderer.svelte
+++ b/packages/bbui/src/Table/CellRenderer.svelte
@@ -28,9 +28,27 @@
$: type = schema?.type ?? "string"
$: customRenderer = customRenderers?.find(x => x.column === schema?.name)
$: renderer = customRenderer?.component ?? typeMap[type] ?? StringRenderer
+
+ /**
+ * Don't use falsy here as we want to:
+ * - include empty arrays
+ * - exclude 0 and booleans
+ *
+ * If updated, the corresponding view expression should be updated in 'server/viewBuilder.js'
+ */
+ const isNotSet = value => {
+ return (
+ value === undefined ||
+ value === null ||
+ value === "" ||
+ (Array.isArray(value) && value.length === 0)
+ )
+ }
-{#if renderer && (customRenderer || (value != null && value !== ""))}
+{#if !customRenderer && isNotSet(value)}
+
+{:else if renderer}
diff --git a/packages/bbui/src/Table/StringRenderer.svelte b/packages/bbui/src/Table/StringRenderer.svelte
index 6fd731f5ec..7219a1a8f1 100644
--- a/packages/bbui/src/Table/StringRenderer.svelte
+++ b/packages/bbui/src/Table/StringRenderer.svelte
@@ -1,8 +1,11 @@
-
{typeof value === "object" ? JSON.stringify(value) : value}
+
+ {typeof value === "object" ? JSON.stringify(value) : value}
+
diff --git a/packages/builder/src/components/backend/DataTable/modals/FilterModal.svelte b/packages/builder/src/components/backend/DataTable/modals/FilterModal.svelte
index 9c6f4956b0..1b2e92ced2 100644
--- a/packages/builder/src/components/backend/DataTable/modals/FilterModal.svelte
+++ b/packages/builder/src/components/backend/DataTable/modals/FilterModal.svelte
@@ -42,6 +42,14 @@
name: "Contains",
key: "CONTAINS",
},
+ {
+ name: "Is Set",
+ key: "SET",
+ },
+ {
+ name: "Is Not Set",
+ key: "NOT_SET",
+ },
]
const CONJUNCTIONS = [
@@ -116,6 +124,10 @@
const getOptionLabel = x => x.name
const getOptionValue = x => x.key
+
+ const showValue = filter => {
+ return !(filter.condition === "SET" || filter.condition === "NOT_SET")
+ }
@@ -144,30 +156,36 @@
{getOptionLabel}
{getOptionValue}
/>
- {#if filter.key && isMultipleChoice(filter.key)}
-