Hi! I have a custom implementation of JsonForms for React Native. I’ve been creating renderers and added functionality to render forms. That is working well! I want to have multi-layouts support. So I created custom vertical and group layouts. They work well along. When I tried to combine those (group layouts inside a vertical layout) the renderers are not being rendering. Seems like something is happening with JsonFormsDispatch.
So this is my VerticalLayout:
<JsonFormsLayout
uischema={uischema}
schema={schema}
visible={visible}
enabled={enabled}
path={path}
orientation="vertical"
>
<ChildrenRenderer schema={schema} path={path} layout={verticalLayout} />
</JsonFormsLayout>
JsonFormsLayout:
<ScrollView
style={{
flex: 1,
flexDirection,
}}
>
{/* eslint-disable-next-line react/destructuring-assignment */}
{props.children}
</ScrollView>
ChildrenRenderer
<View style={{ flex: 1, flexDirection: 'column' }}>
{(layout.elements || []).map((child: any, index: number) => (
<View style={{ flex: 1, flexDirection: 'column' }}>
<JsonFormsDispatch
/* eslint-disable-next-line react/no-array-index-key */
key={`${path}-${index}`}
uischema={child}
schema={schema}
path={path}
visible
/>
</View>
))}
</View>
Basically group layout is based on vertical layout but it adds a label as a title.