Clean table data before using it as additional data context to better reflect usable structure

This commit is contained in:
Andrew Kingston 2024-10-31 12:28:52 +00:00
parent 0b8199be74
commit afbec934f3
No known key found for this signature in database
1 changed files with 4 additions and 2 deletions

View File

@ -60,8 +60,10 @@
// Provide additional data context for live binding eval // Provide additional data context for live binding eval
export const getAdditionalDataContext = () => { export const getAdditionalDataContext = () => {
const rows = get(grid?.getContext()?.rows) const gridContext = grid?.getContext()
const goldenRow = generateGoldenSample(rows) const rows = get(gridContext?.rows) || []
const cleaned = rows.map(gridContext?.rows.actions.cleanRow || (x => x))
const goldenRow = generateGoldenSample(cleaned)
const id = get(component).id const id = get(component).id
return { return {
// Not sure what this one is for... // Not sure what this one is for...