Style for all rows in a particular group
Hello, I am looking for a way to style all rows within a particular group. When inspecting the objects I see that idx cannot be used because if your groups are of many different sizes it is unreliable for order. I essentially need a reference to the "group I am in" from the row perspective to determine my background color for my use case. Is there a simple way to do this? If not, consider this a feature request.
Thanks!
WHICH VERSION OF REACT ARE YOU USING?
Officially Supported:
[x ] v0.14.x
Community Supported:
[ ] v15.0.x
WHICH BROWSER ARE YOU USING?
Officially Supported:
[ ] IE 9 / IE 10 / IE 11
[ ] Edge
[x ] Chrome
Should work:
[ ] Firefox
[ ] Safari
I'm submitting a ... (check one with "x")
[ ] bug report
[ x] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/adazzle/react-data-grid/blob/master/CONTRIBUTING.md
Current behavior No obvious way to reference current group from row renderer
Expected/desired behavior Row renderer should know what group it is in so it can be styled
Reproduction of the problem Attempt to style groups of rows uniquely
What is the motivation / use case for changing the behavior? Instead of providing just a header as a visual signal for what is grouped, I would also like to change the background color of the rows in an alternating-by-group fashion
I implemented this successfully but it was very hacky, I am using my own counter to construct a group number and indexing it by the name of the GroupRow, and referencing my own group number to do the styling.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please reopen this if you feel it has been incorrectly closed and we will do our best to look into it. Thank you for your contributions.
still a legitimate issue, should fix.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please reopen this if you feel it has been incorrectly closed and we will do our best to look into it. Thank you for your contributions.
stahp
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please reopen this if you feel it has been incorrectly closed and we will do our best to look into it. Thank you for your contributions.
still an issue but this bot is terrible
can you show your solution please?
@DrogoNevets
can you show your solution please?
"I am using my own counter to construct a group number and indexing it by the name of the GroupRow, and referencing my own group number to do the styling."
this is all I have from the solution, I no longer have access to the source code written relating to this problem.