+const CreateGroupFormFields = () =>
+ <>
+ <GroupNameField />
+ <UsersField />
+ </>;
+
+const GroupNameField = () =>
+ <Field
+ name={CREATE_GROUP_NAME_FIELD_NAME}
+ component={TextField}
+ validate={GROUP_NAME_VALIDATION}
+ label="Name"
+ autoFocus={true} />;
+
+const GROUP_NAME_VALIDATION = [require, maxLength(255)];
+
+const UsersField = () =>
+ <FieldArray
+ name={CREATE_GROUP_USERS_FIELD_NAME}
+ component={UsersSelect} />;
+
+const UsersSelect = ({ fields }: WrappedFieldArrayProps<Participant>) =>
+ <ParticipantSelect
+ onlyPeople
+ label='Enter email adresses '
+ items={fields.getAll() || []}
+ onSelect={fields.push}
+ onDelete={fields.remove} />;