Clear the changed environment display if the user cancels out of modal

This commit is contained in:
Montana
2018-09-20 09:31:47 -04:00
parent bf605d1ce6
commit b973d3cf45
2 changed files with 10 additions and 8 deletions

View File

@@ -18,12 +18,13 @@ export default {
props: {
choices: Array,
initialData: String
initialData: String,
},
data: function () {
return { value: this.initialData }
return {
value: this.initialData,
}
},
methods: {
@@ -33,9 +34,10 @@ export default {
readableName: function (role) {
return role.replace(/[_]/g, " ")
},
cancel: function (current_role, selected_role) {
if (current_role != selected_role) {
this.value = current_role
}
}
},
mounted: function () {
console.log(this.initialData, this.choices)
}
}