From a071ff625fcc87182603983ede88358ba2887819 Mon Sep 17 00:00:00 2001 From: Montana Date: Fri, 21 Sep 2018 09:33:49 -0400 Subject: [PATCH] Rename confusing variable --- js/components/forms/edit_workspace_member.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/js/components/forms/edit_workspace_member.js b/js/components/forms/edit_workspace_member.js index 4785217c..37cf00bb 100644 --- a/js/components/forms/edit_workspace_member.js +++ b/js/components/forms/edit_workspace_member.js @@ -23,29 +23,30 @@ export default { data: function () { return { - value: this.initialData, + new_role: this.initialData, } }, methods: { change: function (e) { - this.value = e.target.value + e.preventDefault() + this.new_role = e.target.value }, cancel: function (current_role, selected_role) { if (current_role != selected_role) { - this.value = current_role + this.new_role = current_role } - } + }, }, computed: { displayName: function () { for (var arr in this.choices) { - if (this.choices[arr][0] == this.value) { + if (this.choices[arr][0] == this.new_role) { return this.choices[arr][1].name } } - return this.value ? this.value : "no access" + return this.new_role ? this.new_role : "no access" }, label_class: function () { return this.displayName === "no access" ?