-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
Description
Below is the custom template code I have given to the json schema form. For objects in the form schema, it automatically creates a divi with the form-group field field-object class and MuiGrid-root MuiGrid-container MuiGrid-spacing-xs-3 class. I don't want these to happen. I want all items to be lined up side by side (MuiGrid-root MuiGrid-item MuiGrid-grid-xs-6). How can I do it.
const CustomTemplate = (oftProps: ObjectFieldTemplateProps):any => (
<div>
<Grid container spacing={getSpacing(3)}>
{oftProps.properties.map((element) => {
if ((element.content.props.schema.type === undefined && element.content.props.schema.$ref === undefined)
|| (element.content.props.schema.type !== undefined && element.content.props.schema.type !== 'object')
|| enumFieldControl(element)) {
return <Grid item xs={getColumns(2)}><Paper>{element.content}</Paper></Grid>;
}
return <Hidden>{element.content}</Hidden>;
})}
</Grid>
</div>
);