From 916ab7dd4efc6eede802db2517960e4961a90282 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 1 Sep 2020 15:48:38 +0000 Subject: [PATCH] --- ayanova/src/components/gz-data-table.vue | 7 +++++++ ayanova/src/views/widgets.vue | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ayanova/src/components/gz-data-table.vue b/ayanova/src/components/gz-data-table.vue index fab49444..a2a254b1 100644 --- a/ayanova/src/components/gz-data-table.vue +++ b/ayanova/src/components/gz-data-table.vue @@ -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 []; diff --git a/ayanova/src/views/widgets.vue b/ayanova/src/views/widgets.vue index 9aac929b..dffe439d 100644 --- a/ayanova/src/views/widgets.vue +++ b/ayanova/src/views/widgets.vue @@ -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(