From 9aece2318b066532f2b38a758c631df79fa63dc9 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 24 Mar 2020 19:50:38 +0000 Subject: [PATCH] now with edit vs create icon --- ayanova/src/components/pick-list.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ayanova/src/components/pick-list.vue b/ayanova/src/components/pick-list.vue index 94a0ddeb..34ad99c1 100644 --- a/ayanova/src/components/pick-list.vue +++ b/ayanova/src/components/pick-list.vue @@ -19,7 +19,7 @@ :no-filter="isTagFilter" :append-icon="errorIcon" @click:append="handleErrorClick" - :prepend-icon="allowEdit ? 'fa-edit' : null" + :prepend-icon="editIcon()" @click:prepend="handleEditClick" @mousedown="dropdown" > @@ -181,6 +181,15 @@ export default { data: "ay-start-form-picklist" }); }, + editIcon: function() { + if (!this.allowEdit) { + return null; + } + if (this.value != 0) { + return "fa-edit"; + } + return "fa-plus"; + }, handleEditClick: function() { var idToOpen = 0; if (this.lastSelection != null && this.lastSelection.id) {