This commit is contained in:
@@ -459,11 +459,18 @@ export default {
|
|||||||
getRowIds() {
|
getRowIds() {
|
||||||
//get selected row id's if there are selections else get all row id's
|
//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
|
//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) {
|
if (this.selected.length > 0) {
|
||||||
//return row id's of selected items only
|
//return row id's of selected items only
|
||||||
|
return this.selected.map(z => {
|
||||||
|
return z.id;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if (this.records.length > 0) {
|
if (this.records.length > 0) {
|
||||||
//return row id's of all items
|
//return row id's of all items
|
||||||
|
return this.records.map(z => {
|
||||||
|
return z.id;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
//no data, just return an empty array
|
//no data, just return an empty array
|
||||||
return [];
|
return [];
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ async function clickHandler(menuItem) {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
//general report selector chosen
|
//general report selector chosen
|
||||||
m.vm.$refs.gzdatatable.getRowIds();
|
console.log(m.vm.$refs.gzdatatable.getRowIds());
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let res = await m.vm.$refs.reportSelector.open(
|
let res = await m.vm.$refs.reportSelector.open(
|
||||||
|
|||||||
Reference in New Issue
Block a user