Separated input value from active role value

This commit is contained in:
Michael Rogers 2023-06-20 17:29:27 -05:00
parent 6444e9139e
commit 528f87e930

View File

@ -38,7 +38,8 @@ export default {
userName: undefined, userName: undefined,
role: undefined, role: undefined,
loggedIn: false, loggedIn: false,
roleChannelProvider: undefined roleChannelProvider: undefined,
inputRoleSelection: undefined
}; };
}, },
@ -82,7 +83,7 @@ export default {
message: 'Please select your role for operator status.', message: 'Please select your role for operator status.',
currentSelection: this.role, currentSelection: this.role,
onChange: (event) => { onChange: (event) => {
this.role = event.target.value; this.inputRoleSelection = event.target.value;
}, },
buttons: [ buttons: [
{ {
@ -90,7 +91,7 @@ export default {
emphasis: true, emphasis: true,
callback: () => { callback: () => {
dialog.dismiss(); dialog.dismiss();
this.updateRole(this.role); this.updateRole(this.inputRoleSelection);
this.openmct.notifications.info(`Successfully set new role to ${this.role}`); this.openmct.notifications.info(`Successfully set new role to ${this.role}`);
} }
} }