-
We are migrating our tables from v7 to v8. And I'm kinda got a problem with cells conditional styling. In v7 we used this: https://react-table-v7.tanstack.com/docs/examples/data-driven-classes-and-styles But in v8 I can't find anything like that.... So far I tried to use But problem is anything I can set to meta are static values. For my case I need to set specific className based on my status value. And seems like in meta we can't access any cell props...
So is there are any way of achieving that using v8??? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
As in v8 the way cells are rendered has changed, you should be able to calculate custom class name when rendering the table. A quick idea that came to my mind would be to try something like this:
Where you define a custom function You might as well define |
Beta Was this translation helpful? Give feedback.
As in v8 the way cells are rendered has changed, you should be able to calculate custom class name when rendering the table. A quick idea that came to my mind would be to try something like this:
Where you define a custom function
getCellClassName()
and then you can usecell.row.original
to access…