Merge pull request #15505 from Budibase/fix/disable-cell-formatting
Disabling grid cell formatting
This commit is contained in:
commit
ad55f88756
|
@ -3089,12 +3089,6 @@
|
||||||
"type": "tableConditions",
|
"type": "tableConditions",
|
||||||
"label": "Conditions",
|
"label": "Conditions",
|
||||||
"key": "conditions"
|
"key": "conditions"
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "text",
|
|
||||||
"label": "Format",
|
|
||||||
"key": "format",
|
|
||||||
"info": "Changing format will display values as text"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -7691,8 +7685,7 @@
|
||||||
{
|
{
|
||||||
"type": "columns/grid",
|
"type": "columns/grid",
|
||||||
"key": "columns",
|
"key": "columns",
|
||||||
"resetOn": "table",
|
"resetOn": "table"
|
||||||
"nested": true
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
import { get, derived, readable } from "svelte/store"
|
import { get, derived, readable } from "svelte/store"
|
||||||
import { featuresStore } from "stores"
|
import { featuresStore } from "stores"
|
||||||
import { Grid } from "@budibase/frontend-core"
|
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
|
// table is actually any datasource, but called table for legacy compatibility
|
||||||
export let table
|
export let table
|
||||||
|
@ -105,7 +105,7 @@
|
||||||
order: idx,
|
order: idx,
|
||||||
conditions: column.conditions,
|
conditions: column.conditions,
|
||||||
visible: !!column.active,
|
visible: !!column.active,
|
||||||
format: createFormatter(column),
|
// format: createFormatter(column),
|
||||||
}
|
}
|
||||||
if (column.width) {
|
if (column.width) {
|
||||||
overrides[column.field].width = column.width
|
overrides[column.field].width = column.width
|
||||||
|
@ -114,12 +114,12 @@
|
||||||
return overrides
|
return overrides
|
||||||
}
|
}
|
||||||
|
|
||||||
const createFormatter = column => {
|
// const createFormatter = column => {
|
||||||
if (typeof column.format !== "string" || !column.format.trim().length) {
|
// if (typeof column.format !== "string" || !column.format.trim().length) {
|
||||||
return null
|
// return null
|
||||||
}
|
// }
|
||||||
return row => processStringSync(column.format, { [id]: row })
|
// return row => processStringSync(column.format, { [id]: row })
|
||||||
}
|
// }
|
||||||
|
|
||||||
const enrichButtons = buttons => {
|
const enrichButtons = buttons => {
|
||||||
if (!buttons?.length) {
|
if (!buttons?.length) {
|
||||||
|
|
Loading…
Reference in New Issue