How to highlight some cells (td element)?

UI Components for React
Post Reply
whity
Posts: 5
Joined: 02 Aug 2019, 10:11

20 Sep 2019, 15:29

Hi

I would like to highlight background of some td elements. I know that I can use templates, but in this case, I have to return element. And for example when I will return div with some background, it doesn't looks good, because td element has its own padding.

So we would have smth like:

Code: Select all

<td style="padding: 5px">
   <div style="backgroundColor: red"></div>
</td>
Is it possible to add some class to td element depending on row and column data? I don't want to change td styling.

Thanks

whity
Posts: 5
Joined: 02 Aug 2019, 10:11

24 Sep 2019, 15:18

Guys? This is not possible?

MaxP00
Posts: 1
Joined: 27 Oct 2019, 21:51

27 Oct 2019, 21:55

whity wrote:
24 Sep 2019, 15:18
Guys? This is not possible?
Yea definitely. Get the padding to the center.

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 27 guests