Add remove LOA button
This commit is contained in:
parent
2d2f8d8d93
commit
9a7bcd6f29
@ -42,5 +42,11 @@ export default {
|
||||
addLOA: function(event) {
|
||||
this.loas.push(createLOA(''))
|
||||
},
|
||||
|
||||
removeLOA: function(index) {
|
||||
if (this.loas.length > 1) {
|
||||
this.loas.splice(index, 1)
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -84,6 +84,10 @@
|
||||
<input type="text" v-model='loa.number' :id="'loas-' + i" placeholder="1234567890"/>
|
||||
<input type="hidden" :name="'loas-' + i" v-model='loa.number'/>
|
||||
</div>
|
||||
<button v-on:click="removeLOA(i)" v-if="loas.length > 1" type="button" class='application-edit__env-list-item__remover'>
|
||||
{{ Icon('trash') }}
|
||||
<span>Remove</span>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="task-order__loa-add-item">
|
||||
|
Loading…
x
Reference in New Issue
Block a user