diff --git a/core/src/Render.tsx b/core/src/Render.tsx index a5b86fc..d02d9d7 100644 --- a/core/src/Render.tsx +++ b/core/src/Render.tsx @@ -6,11 +6,11 @@ export type RenderChildren = | { children?: React.ReactNode }; export const Render: FC = ({ children }) => { - const { fields = {}, buttons = {}, extra = {}, blocks = {}, data } = useStore(); + const { fields = {}, buttons = {}, extra = {}, $$index = {}, blocks = {}, data } = useStore(); const childs = typeof children === 'function' ? [] : Children.toArray(children); return ( - {typeof children === 'function' && !isValidElement(children) && children({ fields, buttons, blocks, extra }, { ...data })} + {typeof children === 'function' && !isValidElement(children) && children({ fields, buttons, blocks, extra, $$index }, { ...data })} {typeof children !== 'function' && childs.map((child, key) => { if (!isValidElement(child)) return null; return cloneElement(child, {