fix(row): set max-width for row

This commit is contained in:
Bruno Crosier
2024-08-29 02:23:54 +01:00
parent 12fb691e4f
commit efe17ff5e4
2 changed files with 29 additions and 2 deletions

View File

@@ -85,6 +85,19 @@ export const RenderField: React.FC<Props> = ({
/>
)
} else {
if (fieldComponentProps.field.type === 'row') {
for (const field of fieldComponentProps.field.fields) {
if (field.admin?.width) {
field.admin.style = {
...field.admin.style,
maxWidth: field.admin.width,
}
field.admin.width = undefined
}
}
}
RenderedField = (
<RenderComponent
Component={fieldComponents?.[fieldComponentProps?.field?.type]}