This commit is contained in:
Jan Prochazka
2020-11-01 15:52:31 +01:00
parent 229f0ea9c1
commit 0d2120e96b
2 changed files with 8 additions and 7 deletions

View File

@@ -16,7 +16,7 @@ const getMacroFunction = {
${code}
}
`,
transformData: (code) => `
transformData: (code) => `
(rows, args, modules, selectedCells, cols, columns) => {
${code}
}
@@ -142,6 +142,7 @@ function runTramsformData(
if (cols && !columns) {
columns = cols.map((columnName) => ({ columnName }));
}
columns = _.uniqBy(columns, 'columnName');
if (!preview) {
rows = removePreviewRowFlags(rows);
}

View File

@@ -206,12 +206,12 @@ const resultRows = rows.map((row, rowIndex) => {
};
const fields = {
year: mom.year(),
month: mom.month() + 1,
day: mom.day(),
hour: mom.hour(),
minute: mom.minute(),
second: mom.second(),
[args.year]: mom.year(),
[args.month]: mom.month() + 1,
[args.day]: mom.day(),
[args.hour]: mom.hour(),
[args.minute]: mom.minute(),
[args.second]: mom.second(),
};
return {