T
TanStack2y ago
conscious-sapphire

Get table header inside the cell

Hello, I would like to show the table header inside the cell. I'm trying to do something like this but I get a typescript error Also, I don't know if this is the way or it's a better one. Thank you.
Expected 1 arguments, but got 0.ts(2554)
types.d.ts(68, 67): An argument for 'props' was not provided.
Expected 1 arguments, but got 0.ts(2554)
types.d.ts(68, 67): An argument for 'props' was not provided.
const header =
cell.column.columnDef && typeof cell.column.columnDef.header === 'function'
? cell.column.columnDef.header()
: null;

...
{header && <span className={styles.cellHeader}> {header}</span>}
const header =
cell.column.columnDef && typeof cell.column.columnDef.header === 'function'
? cell.column.columnDef.header()
: null;

...
{header && <span className={styles.cellHeader}> {header}</span>}
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?