Group header function called twice
See original GitHub issueDescribe 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:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have pushed an update to the 4.4 branch which includes a console warning for this issue.
Cheers
Oli 😃
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 😃