return <>
<ParticipantField
name={VIRTUAL_MACHINE_ADD_LOGIN_USER_FIELD}
- component={UserSelect}
+ component={props.data.updating ? ReadOnlyUserSelect : UserSelect}
excludedParticipants={props.data.excludedParticipants}
/>
<GroupArrayInput
</>;
}
-
interface UserFieldProps {
excludedParticipants: string[];
}
excludedParticipants={props.excludedParticipants}
onSelect={props.input.onChange}
onDelete={() => (props.input.onChange(''))} />;
+
+const ReadOnlyUserSelect = (props) =>
+ <ParticipantSelect
+ onlyPeople
+ label='User'
+ items={props.input.value ? [props.input.value] : []}
+ disabled={true} />;