1
0
Fork 0
mirror of synced 2024-06-18 18:35:37 +12:00

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

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,