1
0
Fork 0
mirror of synced 2024-09-28 07:11:40 +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 component = getContext("component")
const context = getContext("context") const context = getContext("context")
const { styleable, getAction, ActionTypes, rowSelectionStore } = const {
getContext("sdk") styleable,
getAction,
ActionTypes,
rowSelectionStore,
generateGoldenSample,
} = getContext("sdk")
const customColumnKey = `custom-${Math.random()}` const customColumnKey = `custom-${Math.random()}`
const customRenderers = [ const customRenderers = [
{ {
@ -63,6 +69,16 @@
selectedRows, selectedRows,
} }
// Provide additional data context for live binding eval
export const getAdditionalDataContext = () => {
const goldenRow = generateGoldenSample(data)
return {
eventContext: {
row: goldenRow,
},
}
}
const getFields = ( const getFields = (
schema, schema,
customColumns, customColumns,