This commit is contained in:
2021-04-08 20:43:05 +00:00
parent 3e8beef3e9
commit 507727699d
2 changed files with 41 additions and 23 deletions

View File

@@ -167,17 +167,7 @@ export default {
if ((await window.$gz.dialog.confirmDelete()) != true) {
return;
}
this.value.items.splice(this.pvm.selectedItemIndex, 1);
this.pvm.selectItem(null); //select nothing in essence resetting a child selects and this one too clearing form
//todo: put this id in a collection at parent to be deleted when it's saved and marked dirty (a function "DeleteItem(index)")
//if no concurrency then just remove and ignore, no need to save, if concurrency then it needs to be deleted at the server
// if (this.value.items.length > 0) {
// this.pvm.selectedItemIndex = this.value.items.length - 1;
// } else {
// this.pvm.selectedItemIndex = null;
// }
this.pvm.deleteItem(this.pvm.selectedItemIndex);
},
selectItem: function(item) {
this.selectedRow = [item];