diff --git a/packages/form-js-viewer/src/features/repeatRender/RepeatRenderManager.js b/packages/form-js-viewer/src/features/repeatRender/RepeatRenderManager.js index cc255017f..4bbf7a4f0 100644 --- a/packages/form-js-viewer/src/features/repeatRender/RepeatRenderManager.js +++ b/packages/form-js-viewer/src/features/repeatRender/RepeatRenderManager.js @@ -34,7 +34,7 @@ export default class RepeatRenderManager { Repeater(props) { - const { RowsRenderer, indexes, useSharedState, ...restProps } = props; + const { RowsRenderer, indexes, useSharedState, variableContext: parentVariableContext, ...restProps } = props; const [ sharedRepeatState ] = useSharedState; @@ -63,10 +63,15 @@ export default class RepeatRenderManager { return ( <> - {displayValues.map((_, index) => { + {displayValues.map((value, index) => { const elementProps = { ...restProps, - indexes: { ...(indexes || {}), [ repeaterField.id ]: index } + indexes: { ...(indexes || {}), [ repeaterField.id ]: index }, + variableContext: { + this: value, + parent: parentVariableContext, + i: [ ...parentVariableContext.i , index ] + } }; return