From 5df197a36ea0c7bac123550e7b99d9e46f15535f Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 7 Feb 2025 13:49:34 +0000 Subject: [PATCH 1/3] Disabling cell formatting, it is currently incompatiable with cell/row conditions in grids and to avoid breaking those for now we are removing the capability until both can be a aligned to use the same mechanism of binding evaluation. --- packages/client/manifest.json | 9 +-------- packages/client/src/components/app/GridBlock.svelte | 2 +- .../src/components/grid/stores/conditions.ts | 1 + 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/packages/client/manifest.json b/packages/client/manifest.json index 4b13713984..c236dd1ad9 100644 --- a/packages/client/manifest.json +++ b/packages/client/manifest.json @@ -3089,12 +3089,6 @@ "type": "tableConditions", "label": "Conditions", "key": "conditions" - }, - { - "type": "text", - "label": "Format", - "key": "format", - "info": "Changing format will display values as text" } ] }, @@ -7691,8 +7685,7 @@ { "type": "columns/grid", "key": "columns", - "resetOn": "table", - "nested": true + "resetOn": "table" } ] }, diff --git a/packages/client/src/components/app/GridBlock.svelte b/packages/client/src/components/app/GridBlock.svelte index 1f4792ea8a..52040b8e58 100644 --- a/packages/client/src/components/app/GridBlock.svelte +++ b/packages/client/src/components/app/GridBlock.svelte @@ -105,7 +105,7 @@ order: idx, conditions: column.conditions, visible: !!column.active, - format: createFormatter(column), + // format: createFormatter(column), } if (column.width) { overrides[column.field].width = column.width diff --git a/packages/frontend-core/src/components/grid/stores/conditions.ts b/packages/frontend-core/src/components/grid/stores/conditions.ts index cf47456b44..37f8f3432a 100644 --- a/packages/frontend-core/src/components/grid/stores/conditions.ts +++ b/packages/frontend-core/src/components/grid/stores/conditions.ts @@ -173,5 +173,6 @@ const evaluateConditions = (row: UIRow, conditions: UICondition[]) => { // Swallow } } + console.log(metadata) return metadata } From 73345d8c05ed34cc1daf4958192f8e39f9c416d5 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 7 Feb 2025 13:53:30 +0000 Subject: [PATCH 2/3] Linting. --- packages/client/src/components/app/GridBlock.svelte | 12 ++++++------ .../src/components/grid/stores/conditions.ts | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/client/src/components/app/GridBlock.svelte b/packages/client/src/components/app/GridBlock.svelte index 52040b8e58..7f4990ace0 100644 --- a/packages/client/src/components/app/GridBlock.svelte +++ b/packages/client/src/components/app/GridBlock.svelte @@ -114,12 +114,12 @@ return overrides } - const createFormatter = column => { - if (typeof column.format !== "string" || !column.format.trim().length) { - return null - } - return row => processStringSync(column.format, { [id]: row }) - } + // const createFormatter = column => { + // if (typeof column.format !== "string" || !column.format.trim().length) { + // return null + // } + // return row => processStringSync(column.format, { [id]: row }) + // } const enrichButtons = buttons => { if (!buttons?.length) { diff --git a/packages/frontend-core/src/components/grid/stores/conditions.ts b/packages/frontend-core/src/components/grid/stores/conditions.ts index 37f8f3432a..cf47456b44 100644 --- a/packages/frontend-core/src/components/grid/stores/conditions.ts +++ b/packages/frontend-core/src/components/grid/stores/conditions.ts @@ -173,6 +173,5 @@ const evaluateConditions = (row: UIRow, conditions: UICondition[]) => { // Swallow } } - console.log(metadata) return metadata } From e9e1eb7a2db04c34b72cc88ca03f7b64447fe9ee Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 7 Feb 2025 13:56:34 +0000 Subject: [PATCH 3/3] More linting. --- packages/client/src/components/app/GridBlock.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/components/app/GridBlock.svelte b/packages/client/src/components/app/GridBlock.svelte index 7f4990ace0..b75ca46223 100644 --- a/packages/client/src/components/app/GridBlock.svelte +++ b/packages/client/src/components/app/GridBlock.svelte @@ -5,7 +5,7 @@ import { get, derived, readable } from "svelte/store" import { featuresStore } from "stores" import { Grid } from "@budibase/frontend-core" - import { processStringSync } from "@budibase/string-templates" + // import { processStringSync } from "@budibase/string-templates" // table is actually any datasource, but called table for legacy compatibility export let table