update groupBy methods

This commit is contained in:
joshuashoemaker 2022-06-26 01:09:50 -05:00
parent 592eb5697d
commit c40fbea756

View File

@ -10,7 +10,7 @@ class GroupByNodule extends Nodule_1.default {
this.setGroupByValue(props.groupByValue);
}
asTables = () => {
const exports = this.exportTables();
const exports = this.exportRowGroups();
const tables = [];
for (let key in exports) {
const newTableProps = {
@ -29,7 +29,7 @@ class GroupByNodule extends Nodule_1.default {
export = () => {
throw new Error('"export()" can not be called by GroupByNodule. Call "exportTables()"');
};
exportTables = () => {
exportRowGroups = () => {
const { groupByValue } = this;
const rows = this.tables.map(t => t.export()).flat();
const groupedByRows = rows.reduce((groups, r) => {