This commit is contained in:
2020-12-09 17:52:05 +00:00
parent 91ddef7a29
commit b081f30b4a
3 changed files with 15 additions and 7 deletions

View File

@@ -53,7 +53,6 @@ export default {
},
open(dls) {
// console.log("OPEN", dls);
// this.$on("ext-close-refresh", this.close({ refresh: true }));
this.dataListSelection = dls;
this.isVisible = true;
return new Promise((resolve, reject) => {
@@ -62,7 +61,6 @@ export default {
});
},
close(ret) {
//this.$off("ext-close-refresh");
this.isVisible = false;
this.resolve(ret);
}

View File

@@ -450,7 +450,7 @@ export default {
},
reload: function(newValue, oldValue) {
if (newValue != oldValue) {
this.getDataFromApi();
this.getDataFromApi(true);
}
}
},
@@ -575,7 +575,7 @@ export default {
//i is the actual AyaNova index of vm record so we have all we need to open vm object
window.$gz.eventBus.$emit("openobject", { type: typeToOpen, id: i });
},
async getDataFromApi() {
async getDataFromApi(deSelectAll) {
let vm = this;
if (vm.loading) {
@@ -599,7 +599,11 @@ export default {
vm.loading = true;
//Weird bug that causes grid to show all items selected after async method runs below to fetch data
//this puts a pin in it then resets it after the fetch is completed
let preSelected = [...vm.selected];
let preSelected = [];
if (!deSelectAll) {
//preserve selections
preSelected = [...vm.selected];
}
try {
//untokenize ListView date token criteria (if there are any)

View File

@@ -14,6 +14,7 @@
:dataListFilter="dataListFilter"
:dataListSort="dataListSort"
:showSelect="rights.change"
:reload="reload"
v-on:selection-change="handleSelected"
data-cy="widgetsTable"
>
@@ -40,7 +41,8 @@ export default {
dataListSort: "",
rights: window.$gz.role.defaultRightsObject(),
ayType: window.$gz.type.Widget,
selectedItems: []
selectedItems: [],
reload: false
};
},
methods: {
@@ -74,7 +76,11 @@ async function clickHandler(menuItem) {
let res = await m.vm.$refs.extensions.open(
m.vm.$refs.gzdatatable.getDataListSelection(window.$gz.type.Widget)
);
console.log("widgets::extensions res=", res);
if (res && res.refresh == true) {
//force full refresh of grid including selections
m.vm.reload = !m.vm.reload;
}
//console.log("widgets::extensions res=", res);
break;
case "report":
if (m.id != null) {