This commit is contained in:
@@ -173,15 +173,20 @@ export default {
|
||||
let o = this.value.items[this.activeItemIndex];
|
||||
if (o.id != 0) {
|
||||
//it's a previously saved item so it needs to be removed at the server too
|
||||
//todo: event delete graphitem - this.deletedItems.push(o.id);
|
||||
this.$emit("graph-item-deleted", {
|
||||
atype: window.$gz.type.WorkOrderItem,
|
||||
id: o.id
|
||||
});
|
||||
}
|
||||
this.value.items.splice(this.activeItemIndex, 1);
|
||||
this.selectedRow = [];
|
||||
this.activeItemIndex = null; //select nothing in essence resetting a child selects and this one too clearing form
|
||||
//if only one record left then display it otherwise just let the datatable show what the user can click on
|
||||
if (this.value.items.length == 1) {
|
||||
this.selectedRow = [{ index: 0 }];
|
||||
this.activeItemIndex = 0;
|
||||
} else {
|
||||
this.selectedRow = [];
|
||||
this.activeItemIndex = null; //select nothing in essence resetting a child selects and this one too clearing form
|
||||
}
|
||||
},
|
||||
handleRowClick: function(item) {
|
||||
this.activeItemIndex = item.index;
|
||||
|
||||
Reference in New Issue
Block a user