set dynamically css class for rows
See original GitHub issueI need to set dynamically css class for rows if they contains some specific text. I did it with componentDidUpdate like this:
componentDidUpdate: function(a,b) {
$(this.getDOMNode()).find(" td span:contains('UD')").parents("tr").addClass("red");
},
But it work’s only one, when data loaded into table. And after filter or sort - table refreshing. What is better way for i? I need to change only css classes in rows. Not all CustomRowComponent or all events.
Thank you!
Issue Analytics
- State:
- Created 9 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Dynamically change CSS class of a row in a table
If the value of the cell changes dynamically and you just want all the cells to match, try: $(document).ready(function() { var baseval =...
Read more >[HOW TO] Dynamically set HtmlTableRow CssClass attribute
User-391564799 posted. I am mocking up a simple HTML table that has n rows. I want to alternate the CssClass of each row...
Read more >Changing 'CSS Classes' column attribute dynamically based ...
I wanted to use the "CSS Classes" attribute to dynamically set the CSS Class based on the column value. However, apparently this field...
Read more >apply css class to dynamically generated table row - P2P Wrox
I have a javascript function which will add rows dynamically. But the problem is how should i apply css class to those dynamically...
Read more >Dynamically change css classes for row · Issue #2556 - GitHub
Hi all The question is - how to change css classes for rows? Overview: I have REPEATING 2 rows - A and B....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks @dahlbyk. It working as charm …
@Debananda as of https://github.com/GriddleGriddle/Griddle/pull/644 you can specify
cssClassName
as a function toRowDefinition
:https://github.com/GriddleGriddle/Griddle/blob/cc296fe16f0c8c2b566bfe3abefce9e1db242348/stories/index.tsx#L409-L414