Search code examples
reactjsreact-hooksreact-functional-componentprimereact

How to Highlight colour of specific row in Data table in Prime React


I want to highlight colour of row which have the username "Bret".

Something like this => https://yourimageshare.com/ib/AxZUw6Vuo0

I have searched about this and tried with rowClassName,but none of the method is working. Can you please help me with the same?

Here is my sandbox: https://codesandbox.io/s/primereact-demo-forked-56mh8j


Solution

  • Here is how to use rowClassName to highlight Glenna the user.

    https://codesandbox.io/s/primereact-demo-forked-56mh8j?