Fix bug that would save a user's modal selection even if the user canceled out of the modal

This commit is contained in:
Montana
2018-09-21 10:55:41 -04:00
parent a071ff625f
commit 6d50c228af
2 changed files with 6 additions and 7 deletions

View File

@@ -32,10 +32,8 @@ export default {
e.preventDefault()
this.new_role = e.target.value
},
cancel: function (current_role, selected_role) {
if (current_role != selected_role) {
this.new_role = current_role
}
cancel: function () {
this.new_role = this.initialData
},
},
@@ -51,6 +49,6 @@ export default {
label_class: function () {
return this.displayName === "no access" ?
"label" : "label label--success"
}
},
}
}