Rowspan in react tanstack table v8
How can we set rowspan attribute for a td in react tanstack v8 ? In documentation we can clearly find examples for column group - https://tanstack.com/table/v8/docs/examples/react/column-groups but couldn't find any examples for row group. Would need to create something similar to the one shown in screenshot
React Table Column Groups Example | TanStack Table Docs
An example showing how to implement Column Groups in React Table

10 Replies
stormy-gold•3y ago
+1 - I have the same doubt
Can someone explain this ??
other-emerald•3y ago
Stack Overflow
React table cell merging - Column spanning
How can I achieve this colspan in table body for "950"
Provided no calculation needed and 950 comes calculated
Column Spanning for react-table
equal-aqua•2y ago
this issue seems to be removed...
optimistic-gold•17mo ago
Have you solved it yet?
i found an article, but it didn't help me at all.
https://github.com/TanStack/table/discussions/2233
GitHub
How to use rowSpan? · TanStack table · Discussion #2233
I made a minimal repro of my original code. Here it is in HTML: <!DOCTYPE html> <html> <head> <style> table, th, td { text-align: center; border: 1px dashed lightpink; color...
equal-aqua•17mo ago
Nope anything
generous-apricot•17mo ago
this just hasn't been a problem that TanStack Table has chosen to solve
custom row models or cell APIs could be added in the future by someone if they wanted this to be supported
optimistic-gold•16mo ago
you can use chatgpt to resolve this problem
this is my code and image after run
optimistic-gold•16mo ago
It would be great if the feature was added
generous-apricot•16mo ago
Take a crack at it if you want
ratty-blush•16mo ago
Finally I did dynamic row spanning, check that out here : https://stackblitz.com/edit/tanstack-table-inailv
Ugin
StackBlitz
Table Irrigation experiments - StackBlitz
Grouped (rowSpanned) table exaple using @tanstack/react-table