This commit is contained in:
2020-09-01 15:48:38 +00:00
parent 1effb6ccb2
commit 916ab7dd4e
2 changed files with 8 additions and 1 deletions

View File

@@ -459,11 +459,18 @@ export default {
getRowIds() {
//get selected row id's if there are selections else get all row id's
//called into from parent for things like reporting or bulk ops
//selected or records both are arrays with an id property that contains the row id conveniently for this method
if (this.selected.length > 0) {
//return row id's of selected items only
return this.selected.map(z => {
return z.id;
});
}
if (this.records.length > 0) {
//return row id's of all items
return this.records.map(z => {
return z.id;
});
}
//no data, just return an empty array
return [];

View File

@@ -77,7 +77,7 @@ async function clickHandler(menuItem) {
});
} else {
//general report selector chosen
m.vm.$refs.gzdatatable.getRowIds();
console.log(m.vm.$refs.gzdatatable.getRowIds());
return;
let res = await m.vm.$refs.reportSelector.open(