question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`data` is missed for multi level grouping

See original GitHub issue

Describe the bug When I use multi level grouping the data parameter is empty array. For one level group there is data as expected

Tabulator Info

  • Which version of Tabulator are you using? 4.2
  groupBy : function( data ){ return data.agreement_id +'-' + data.period_id },
  groupHeader : function( value, count, data, group ){
    console.log( data );
    return 'asdf';
  },

_2

For multi level:

  groupBy : [ 'agreement_id', 'period_id' ],
  groupHeader : [ function( value, count, data, group ){
    console.log( data );
    return 'asdf';
  }, function( value, count, data, group ){
    console.log( data );
    return 'asdf';
  } ],

_3

It seems for multi level grouping there is two extra dummy calls and once after the real row:

_

The table: _2

Also documentation does not mention forth parameter: group

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tentuscommented, Jun 11, 2019

It sounds to me like you’re calling getSubGroups on a Group, not a GroupComponent that you link to. The latter wraps a call to the former, forcing the return array to be the child components rather than the children directly.

0reactions
jotscommented, Sep 5, 2020

Thanks. I ended up using the workaround described at #2145. I do think the data field should not be empty for top level groups if multi level grouping is used, but I understand that’s subjective.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to include missing data for multiple groupings within the ...
I have below referenced query which groups studies counts by teacher, study year-month, and room for the past 12 months (including current month) ......
Read more >
7.3 Missing values in multilevel data - Stef van Buuren
In single-level data, missing values may occur in the outcome, in the predictors, or in both. The situation for multilevel data is more...
Read more >
problem with grouping multi-level table in Reporting - Telerik
Hello there, I have this data structure: {Id, Phases, Ring} My content is Id goes from 1:16 Phases is a random string for...
Read more >
What to Do When Data Are Missing in Group Randomized ...
This NCEE Technical Methods report examines how to address the problem of missing data in the analysis of data in Randomized Controlled Trials...
Read more >
Multiple Imputation of Missing Data for Multilevel Models
In the third section, we briefly discuss missing data in categorical and group-level variables. In each section, we present results from simulation studies...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found