mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 04:01:10 -04:00
reset items on selection
This commit is contained in:
@ -20,7 +20,7 @@
|
|||||||
label="name"
|
label="name"
|
||||||
class="multi-select-item"
|
class="multi-select-item"
|
||||||
@value="onTextChange"
|
@value="onTextChange"
|
||||||
@select="(val) => $emit('select', val)"
|
@select="onSelect"
|
||||||
>
|
>
|
||||||
<div slot="afterList">
|
<div slot="afterList">
|
||||||
<button type="button" class="list-add-button" @click="openItemModal">
|
<button type="button" class="list-add-button" @click="openItemModal">
|
||||||
@ -131,6 +131,10 @@ export default {
|
|||||||
'data': {taxPerItem: this.taxPerItem, taxes: this.taxes}
|
'data': {taxPerItem: this.taxPerItem, taxes: this.taxes}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
onSelect(val) {
|
||||||
|
this.$emit('select', val)
|
||||||
|
this.fetchItems()
|
||||||
|
},
|
||||||
deselectItem () {
|
deselectItem () {
|
||||||
this.itemSelect = null
|
this.itemSelect = null
|
||||||
this.$emit('deselect')
|
this.$emit('deselect')
|
||||||
|
|||||||
Reference in New Issue
Block a user