Adding the injection of a default value in the form

This commit is contained in:
2025-04-23 00:06:23 +02:00
parent 9d835d49d9
commit e01430f60e
2 changed files with 9 additions and 6 deletions

View File

@@ -7,10 +7,11 @@ type NewProps = {
resource: string,
schemaName: string,
uiSchema?: UiSchema,
defaultValue?: any
}
const New = <T,>(props: NewProps) => {
const { schemaName, resource, uiSchema } = props;
const { schemaName, resource, uiSchema, defaultValue } = props;
const { currentFirm } = useContext(FirmContext);
const resourceBasePath = `firm/${currentFirm.instance}/${currentFirm.firm}`
@@ -20,7 +21,8 @@ const New = <T,>(props: NewProps) => {
uiSchema={uiSchema}
resourceBasePath={resourceBasePath}
resource={resource}
/>
defaultValue={defaultValue}
/>
)
}