Skip to content

Commit 1877389

Browse files
author
Annie Zhang
authored
Remove index and rows as arguments to the derive expression (#369)
1 parent 8fecb62 commit 1877389

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/table.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -686,10 +686,11 @@ export function __table(source, operations) {
686686
// applied, because operations like filter and sort reference original
687687
// column names.
688688
// TODO Allow derived columns to reference other derived columns.
689-
applyNames(source, operations).map((row, index, rows) => {
689+
applyNames(source, operations).map((row, index) => {
690690
let resolved;
691691
try {
692-
resolved = value(row, index, rows);
692+
// TODO Support referencing `index` and `rows` in the derive function.
693+
resolved = value(row);
693694
} catch (error) {
694695
columnErrors.push({index, error});
695696
resolved = undefined;

0 commit comments

Comments
 (0)