Provide live eval context from legacy table components

This commit is contained in:
Andrew Kingston 2024-03-22 12:14:59 +00:00
parent 53cd48e866
commit a64738fa25
1 changed files with 18 additions and 2 deletions

View File

@ -17,8 +17,14 @@
const component = getContext("component")
const context = getContext("context")
const { styleable, getAction, ActionTypes, rowSelectionStore } =
getContext("sdk")
const {
styleable,
getAction,
ActionTypes,
rowSelectionStore,
generateGoldenSample,
} = getContext("sdk")
const customColumnKey = `custom-${Math.random()}`
const customRenderers = [
{
@ -63,6 +69,16 @@
selectedRows,
}
// Provide additional data context for live binding eval
export const getAdditionalDataContext = () => {
const goldenRow = generateGoldenSample(data)
return {
eventContext: {
row: goldenRow,
},
}
}
const getFields = (
schema,
customColumns,