now with edit vs create icon

This commit is contained in:
2020-03-24 19:50:38 +00:00
parent c235451b80
commit 9aece2318b

View File

@@ -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) {