Skip to content
Discussion options

You must be logged in to vote

@mcongrove There is a way to accomplish this but it is a tad bit error prone:

Option 1: You can store data, such as a boolean, in ColumnDef.meta, but now you need to ensure meta accurately reflects the cell render, which could lead to bugs:

meta?: ColumnMeta<TData, TValue>

Option 2:
If instead your ColumnDef.cell could control the className styling, then you can also store in ColumnDef.meta (if fixed) or (if dynamic/changes between renders) even just define a function/Dictionary, Int => Object, that takes a Column id and outputs additional custom Context based on the column id to render. Then, your ColumnDef.cell

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mcongrove
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants