T
TanStack3y ago
exotic-emerald

How to use colspan or something like that?

Is there a way to use colspan? Or use column group but with only one header? Doc example: https://tanstack.com/table/v8/docs/examples/react/column-groups
No description
3 Replies
exotic-emerald
exotic-emeraldOP3y ago
What I would like it to be
No description
fascinating-indigo
fascinating-indigo3y ago
If your column names are static, you can delete all the content of <thead /> an just manually write a pair of <th /> with your column names. Maybe it's not the accurate solution, but it's the cleanest and the shortest.
wise-white
wise-white3y ago
You could just render headerGroups[0] ... Just be aware that some features only operate on leaf columns by default so if you want to add column filtering, sorting etc you'll need to write some extra code to operate on the leaf columns

Did you find this page helpful?