Skip to content

fix: correct data tree child row aggregation in column calcs#4879

Open
lukecotter wants to merge 2 commits into
tabulator-tables:masterfrom
lukecotter:bug-data-tree-child-rows-not-summed
Open

fix: correct data tree child row aggregation in column calcs#4879
lukecotter wants to merge 2 commits into
tabulator-tables:masterfrom
lukecotter:bug-data-tree-child-rows-not-summed

Conversation

@lukecotter
Copy link
Copy Markdown
Contributor

Summary
This fixes an issue where column calculations for data tree rows could include the parent row repeatedly instead of the child row data.

In the data tree calculation path, [rowsToData] iterates filtered child rows and should push each child row’s data into the calc input. The current logic pushes the parent [row] object instead, which causes incorrect summed values for expanded data tree branches.

  • Fixes incorrect totals/sums for data tree child rows
  • Affects column calculations when [dataTreeChildColumnCalcs] is enabled and a tree node is expanded

fixes #4705

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"dataTreeChildColumnCalcs" doesn't work, the group or table total doesn't sum the children

1 participant