This commit is contained in:
2021-04-09 22:43:42 +00:00
parent 457c6dfe1c
commit 8b474278ee
2 changed files with 8 additions and 9 deletions

View File

@@ -91,10 +91,7 @@
export default {
created() {
if (this.value.items[this.activeWoItemIndex].scheduledUsers.length == 1) {
this.selectedRow = [{ index: 0 }];
this.activeItemIndex = 0;
}
this.setDefaultView();
},
data() {
return {
@@ -156,7 +153,9 @@ export default {
this.activeItemIndex,
1
);
this.setDefaultView();
},
setDefaultView: function() {
//if only one record left then display it otherwise just let the datatable show what the user can click on
if (this.value.items[this.activeWoItemIndex].scheduledUsers.length == 1) {
this.selectedRow = [{ index: 0 }];

View File

@@ -102,10 +102,7 @@ export default {
GzWoItemScheduledUsers
},
created() {
if (this.value.items.length == 1) {
this.selectedRow = [{ index: 0 }];
this.activeItemIndex = 0;
}
this.setDefaultView();
},
data() {
return {
@@ -169,6 +166,9 @@ export default {
});
}
this.value.items.splice(this.activeItemIndex, 1);
this.setDefaultView();
},
setDefaultView: function() {
//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 }];