How to do 'getTrProps' in react-table v7 #2440
Unanswered
mikefedorko
asked this question in
General
Replies: 1 comment
-
Hi @mikefedorko check this one https://codesandbox.io/s/cool-frog-u5y8z?file=/src/App.js. P.S the solution you are looking for is written from lines 65-81, Good luck, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have to check if field isCancelled equal true, then make row red color.
Can somebody explain me how to make something like that in v7 react-table:
getTrProps={(_, { original }) => original.isCancelled ? { style: { background: 'red' } } : {}}
I couldn't find how to do this in documentation.
Beta Was this translation helpful? Give feedback.
All reactions