You need to sign in to do that
Don't have an account?
Jyoti Gaikwad
Lightning Datatable: Highlight the row onclick
Hi everyone,
I need to change background color of the row onclick on it in lightning datatable or HTML table. I am trying it in Lightning web component but I can't find any solution.
I need to change background color of the row onclick on it in lightning datatable or HTML table. I am trying it in Lightning web component but I can't find any solution.
Check on this url you can find the solution
https://salesforce.stackexchange.com/questions/299022/conditionally-highlight-a-cell-using-datatable-in-lwc
Hi Jyoti ,
HTML; JS: If you find your answer than mark as best answer
Thanks And Regard,
Suraj Tripathi.
Not sure if you are looking for something like this -
if yes, then I just added this one liner in css file, you may wish to use it as per your need perhaps.
:host{
--lwc-colorBackgroundRowSelected: rgb(103, 231, 156);
}
Did you find any solution for this?
I have similar requirement, when i have to highlight row onclick and need details in js to perform some task.