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.

Group header function called twice

See original GitHub issue

Describe the bug If I setup groupHeader function when I ma grouping by two fields groupBy : [ "agreement_id", "period_id" ] then that function is called twice: once for each field.

I agree with this behavior because I have only one function for all fields. But when I set a different header for each level of group I pass the array:

  groupHeader    : [ function( value, count, data, group ){
    console.log( value, group ),
     } ]

As you can see I setup only one function for the first field, but this function is called also for the second field. I expect here that for the second field will be called some default function, because I do not provide any function for it

Tabulator Info

  • Which version of Tabulator are you using? 4.2

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
olifolkerdcommented, Jul 28, 2019

I have pushed an update to the 4.4 branch which includes a console warning for this issue.

Cheers

Oli 😃

1reaction
olifolkerdcommented, Apr 28, 2019

I agree with @aklaver once you have chosen to use the groupHeader option you have replaced the default functionality.

I also agree with @KES777 that in that instance there should be a console warning if one is not defined, i will look into this for the 4.3 release.

Thanks for the input.

Cheers

Oli 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is my function being called twice in React? - Stack Overflow
Its because your app component is a wrap in StrictMode . <React.StrictMode> <App /> </React.StrictMode>,. If you are using create-react-app ...
Read more >
Subreport in header or footer called twice if isSplitAllowed ...
I have reports with subreports in group headers or footers and when isSplitAllowed="false" and the header/footer goes to the new page, ...
Read more >
Row Selection - JavaScript Data Grid
Property rowSelection='multiple' is set to enable multiple row selection. ... If headerCheckboxSelection is a function, the function will be called every ...
Read more >
CORS — Story of requesting twice - codeburst
Basically two calls for the same request. Here take a look at the screen shots below. Request with OPTIONS method.
Read more >
Strict Mode - React
Additional functionality will be added with future releases of React. ... this component multiple times could lead to invalid application state.
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