Merge pull request #15505 from Budibase/fix/disable-cell-formatting

Disabling grid cell formatting
This commit is contained in:
Michael Drury 2025-02-07 14:06:08 +00:00 committed by GitHub
commit ad55f88756
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 16 deletions

View File

@ -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"
}
]
},

View File

@ -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
@ -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
@ -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) {