diff --git a/src/components/FeatureType/FeatureTypeCustomForm.vue b/src/components/FeatureType/FeatureTypeCustomForm.vue index a410b18981247b5ff81819a1c224ab4075fde3cb..bdb0fc4fe41b733b395c8a2ef9f049624eff39e5 100644 --- a/src/components/FeatureType/FeatureTypeCustomForm.vue +++ b/src/components/FeatureType/FeatureTypeCustomForm.vue @@ -180,7 +180,7 @@ class="draggable-row" > <i - class="th icon" + class="th icon grey" aria-hidden="true" /> <input @@ -191,6 +191,10 @@ class="options-field" @change="updateOptionValue(index, $event)" > + <i + class="trash icon grey" + @click="deleteOption(index)" + ></i> </div> </div> <div class="ui buttons"> @@ -430,7 +434,7 @@ export default { this.form.options.value = currentOptionsList; this.updateStore(); }, - + initSortable() { this.sortable = new Sortable(document.getElementById(`list-options-${this.customForm.dataKey}`), { animation: 150, @@ -440,9 +444,13 @@ export default { onEnd: this.updateOptionOrder, }); }, - + addOption() { - console.log('addOption'); + this.form.options.value.push(''); + }, + + deleteOption(index) { + this.form.options.value.splice(index, 1); }, updateStore() { @@ -553,7 +561,9 @@ export default { align-items: baseline; margin-bottom: 1em; input { - margin-left: .5em !important; + margin: 0 .5em !important; + } + i.icon.trash { } } </style>