TanStack Table version
v8.20.5
Framework/Library version
v18.3.1
Describe the bug and the steps to reproduce it
The documentation points out to write:
{table.getAllColumns().map((column) => (
<label key={column.id}>
<input
checked={column.getIsVisible()}
disabled={!column.getCanHide()}
onChange={column.getToggleVisibilityHandler()}
type="checkbox"
/>
{column.columnDef.header}
</label>
))}
However {column.columnDef.header} gives a type error and also does not seem to render anything when the header part is a React Element.
Here is a working reproduction of the issue: https://codesandbox.io/p/devbox/pensive-nash-rhj46y?file=%2Fsrc%2Fmain.tsx%3A124%2C42
(forked from this example and only changed the line 124 to {column.columnDef.header})
As you can clearly see only the headers that are defined as strings are being rendered:

Thanks for your help and the great table!
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
https://codesandbox.io/p/devbox/pensive-nash-rhj46y?file=%2Fsrc%2Fmain.tsx%3A124%2C42
Screenshots or Videos (Optional)

Do you intend to try to help solve this bug with your own PR?
None
Terms & Code of Conduct
TanStack Table version
v8.20.5
Framework/Library version
v18.3.1
Describe the bug and the steps to reproduce it
The documentation points out to write:
However
{column.columnDef.header}gives a type error and also does not seem to render anything when the header part is a React Element.Here is a working reproduction of the issue: https://codesandbox.io/p/devbox/pensive-nash-rhj46y?file=%2Fsrc%2Fmain.tsx%3A124%2C42
(forked from this example and only changed the line 124 to
{column.columnDef.header})As you can clearly see only the headers that are defined as strings are being rendered:

Thanks for your help and the great table!
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
https://codesandbox.io/p/devbox/pensive-nash-rhj46y?file=%2Fsrc%2Fmain.tsx%3A124%2C42
Screenshots or Videos (Optional)
Do you intend to try to help solve this bug with your own PR?
None
Terms & Code of Conduct