From 99147af9438379ee9bd7e754adbff4232e18e62d Mon Sep 17 00:00:00 2001 From: Jose Buitron Date: Tue, 12 Mar 2024 11:27:07 -0500 Subject: [PATCH] fix: Reverted form changes, just set border --- src/forms/components/Form.js | 173 ++++++++++++++++++----------------- 1 file changed, 87 insertions(+), 86 deletions(-) diff --git a/src/forms/components/Form.js b/src/forms/components/Form.js index dca6b0381..48522bb46 100644 --- a/src/forms/components/Form.js +++ b/src/forms/components/Form.js @@ -24,9 +24,7 @@ import { useFormState, } from 'react-hook-form'; import { useTranslation } from 'react-i18next'; -import { Button, Grid, Paper } from '@mui/material'; - -import { withProps } from 'react-hoc'; +import { Button, Grid } from '@mui/material'; import FormField from 'forms/components/FormField'; import { useFormSetContext } from 'forms/formContext'; @@ -153,92 +151,95 @@ const Form = props => { ]); }, [saveLabel, t, onCancel, cancelLabel, isMultiStep]); - const Container = outlined - ? withProps(Paper, { variant: 'outlined' }) - : React.Fragment; - return ( - - - - {fields - .filter(field => - filterField ? filterField(field, { getValues }) : true + + + {fields + .filter(field => + filterField ? filterField(field, { getValues }) : true + ) + .map(field => + field.renderStaticElement ? ( + + {field.renderStaticElement({ t })} + + ) : ( + + ( + + )} + /> + ) - .map(field => - field.renderStaticElement ? ( - - {field.renderStaticElement({ t })} - - ) : ( - - ( - - )} - /> - - ) - )} - {children} - {!_.isEmpty(actions) && ( - - {isMultiStep ? actions.reverse() : actions} - )} - - - + {children} + {!_.isEmpty(actions) && ( + + {isMultiStep ? actions.reverse() : actions} + + )} + + ); };