User Management: user selection fix
authorLaurence Maultsby <laurence.maultsby@riftio.com>
Wed, 8 Mar 2017 15:23:50 +0000 (10:23 -0500)
committerLaurence Maultsby <laurence.maultsby@riftio.com>
Wed, 8 Mar 2017 15:23:50 +0000 (10:23 -0500)
Signed-off-by: Laurence Maultsby <laurence.maultsby@riftio.com>
skyquake/plugins/user-management/src/dashboard/userMgmtStore.js

index 407d9d2..419a40a 100644 (file)
@@ -149,7 +149,7 @@ export default class UserManagementStore {
         }
     }
     handleAddUser() {
-        this.setState(_.merge( this.resetUser() ,{ isEdit: false, userOpen: true }))
+        this.setState(_.merge( this.resetUser() ,{ isEdit: false, userOpen: true, activeIndex: null }))
     }
     handleCreateUser() {
 
@@ -190,7 +190,7 @@ export default class UserManagementStore {
             disabled: this.disabled,
             projectRoles: this.projectRoles
          });
-        let newState = {users, isEdit: true};
+        let newState = {users, isEdit: true, activeIndex: users.length - 1};
         _.merge(newState, this.resetPassword())
         this.setState(newState);
     }