client/src/components/SessionForm.js
changeset 133 6f3078f7fd47
parent 132 906a6c7c7943
child 134 be36eed5e6e0
--- a/client/src/components/SessionForm.js	Tue Aug 01 12:20:14 2017 +0200
+++ b/client/src/components/SessionForm.js	Thu Aug 03 09:44:37 2017 +0200
@@ -27,7 +27,9 @@
   onGroupChange = (e) => {
     const groupName = e.target.value;
 
-    this.props.sessionsActions.updateSession(this.props.currentSession, { group: groupName });
+    const group = this.props.groups.find((g) => g.get('name') === groupName);
+
+    this.props.sessionsActions.updateSession(this.props.currentSession, { group: groupName, protocol: group?group.get('protocol'):'' });
   }
 
   componentWillUpdate = (nextProps, nextState) => {