Adding the injection of a default value in the form
This commit is contained in:
@@ -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}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user