-export const ResourcePropertiesForm = reduxForm({ form: 'rpform' })(
- ({ handleSubmit }: InjectedFormProps) =>
- <form onSubmit={handleSubmit}>
- <Grid container spacing={16}>
- <Grid item xs>
- <PropertyKeyField />
- </Grid>
- <Grid item xs>
- <PropertyValueField />
- </Grid>
- <Grid item xs>
- <Button variant='contained'>Add</Button>
- </Grid>
+export type ResourcePropertiesFormProps = {uuid: string; clearPropertyKeyOnSelect?: boolean } & InjectedFormProps<ResourcePropertiesFormData, {uuid: string; }> & WithStyles<GridClassKey>;
+
+export const ResourcePropertiesForm = ({ handleSubmit, change, submitting, invalid, classes, uuid, clearPropertyKeyOnSelect }: ResourcePropertiesFormProps ) => {
+ change('uuid', uuid); // Sets the uuid field to the uuid of the resource.
+ return <form data-cy='resource-properties-form' onSubmit={handleSubmit}>
+ <Grid container spacing={16} classes={classes}>
+ <Grid item xs>
+ <PropertyKeyField clearPropertyKeyOnSelect />
+ </Grid>
+ <Grid item xs>
+ <PropertyValueField />