How to use rowRenderer from react-data-grid #2904
Unanswered
GiuseppeFantoni
asked this question in
Q&A
Replies: 1 comment
-
This answer might be 2 years too late, but I went down into the same situation because of a stackoverflow post mentioning rowRenderer that this component does not support. The way you pull this off is by following the code from the same example linked in the question, that is: https://github.com/adazzle/react-data-grid/blob/main/website/demos/AllFeatures.tsx In particular this is what does the magic: In my case I defined my css class like:
and passed it like a simple string instead of adding another dependency to my project for linaria |
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
-
Currently I have this dataGrid component from react-data-grid Addazle. In it I pass a property that calls rows={rows.showed}, rows.showed is an Array.
Currently the code works correctly, but now I need to change the background color of some rows, and I saw in the documentation that to do this I need to use rowRenderer
https://codesandbox.io/s/rdg-cell-editing-forked-4vx3rl?file=/src/index.js:792-803 In this link the person uses rowsRenderer, but I could not adapt to my code in tsx
In this last link there is how I would like the table to be
https://adazzle.github.io/react-data-grid/#/all-features
Just a few colored lines
Here is my code of my last attempt:
But i get that error enter image description here
At the moment I just wanted a simple code using rowRenderer that works,
Beta Was this translation helpful? Give feedback.
All reactions