X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/d7a29f892371764b1bff2e6ec64f8011c001b725..59329caeae17903b97b90b167df5a8122a0c9d95:/src/views-components/dialog-forms/add-group-member-dialog.tsx

diff --git a/src/views-components/dialog-forms/add-group-member-dialog.tsx b/src/views-components/dialog-forms/add-group-member-dialog.tsx
index 3840ecd4d6..f4a5c2cfca 100644
--- a/src/views-components/dialog-forms/add-group-member-dialog.tsx
+++ b/src/views-components/dialog-forms/add-group-member-dialog.tsx
@@ -8,13 +8,16 @@ import { reduxForm, InjectedFormProps, WrappedFieldArrayProps, FieldArray } from
 import { withDialog, WithDialogProps } from "~/store/dialog/with-dialog";
 import { FormDialog } from '~/components/form-dialog/form-dialog';
 import { PeopleSelect, Person } from '~/views-components/sharing-dialog/people-select';
-import { ADD_GROUP_MEMBERS_DIALOG, ADD_GROUP_MEMBERS_FORM, AddGroupMembersFormData, ADD_GROUP_MEMBERS_USERS_FIELD_NAME } from '~/store/group-details-panel/group-details-panel-actions';
+import { ADD_GROUP_MEMBERS_DIALOG, ADD_GROUP_MEMBERS_FORM, AddGroupMembersFormData, ADD_GROUP_MEMBERS_USERS_FIELD_NAME, addGroupMembers } from '~/store/group-details-panel/group-details-panel-actions';
 import { minLength } from '~/validators/min-length';
 
 export const AddGroupMembersDialog = compose(
     withDialog(ADD_GROUP_MEMBERS_DIALOG),
     reduxForm<AddGroupMembersFormData>({
         form: ADD_GROUP_MEMBERS_FORM,
+        onSubmit: (data, dispatch) => {
+            dispatch(addGroupMembers(data));
+        },
     })
 )(
     (props: AddGroupMembersDialogProps) =>
@@ -38,6 +41,7 @@ const UsersFieldValidation = [minLength(1, () => 'Select at least one user')];
 
 const UsersSelect = ({ fields }: WrappedFieldArrayProps<Person>) =>
     <PeopleSelect
+        autofocus
         label='Enter email adresses '
         items={fields.getAll() || []}
         onSelect={fields.push}
