forked from rc/aircox
radiocampus/assets/AFormSet: enable definition of the removeItem method
This commit is contained in:
parent
f073a9ef77
commit
4f28e884ae
|
@ -108,6 +108,7 @@
|
|||
|
||||
//! If provided call this function instead of adding an item to rows on "+" button click.
|
||||
actionAdd: Function,
|
||||
actionRemove: Function,
|
||||
|
||||
//! If True, columns can be reordered
|
||||
columnsOrderable: Boolean,
|
||||
|
@ -161,14 +162,12 @@
|
|||
this.$emit('move', {...event, seŧ: set_})
|
||||
},
|
||||
|
||||
removeItem(row) {
|
||||
const item = this.items[row]
|
||||
if(item.id) {
|
||||
// TODO
|
||||
}
|
||||
else {
|
||||
this.items.splice(row,1)
|
||||
removeItem(row, item) {
|
||||
if(this.actionRemove) {
|
||||
this.actionRemove(row, item);
|
||||
return
|
||||
}
|
||||
this.items.splice(row,1)
|
||||
},
|
||||
|
||||
//! Load items into set
|
||||
|
|
Loading…
Reference in New Issue
Block a user