function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Arrielle KooimanArrielle Kooiman 

lightning:TreeGrid Access Specific Row by Data Attribute

Hi everyone,

I'm using the lightning:TreeGrid component and it looks great! One issue I'm facing is that I'd like to change the background color of the <tr> of the current row.

I've set the 'name' of the row to the id of the record, so I know which row I want to change the color of. The component changes give the row a data attribute of data-row-key-value but because of locker service I am unable to access that element with querySelectorAll. From what I've read, the lightning:TreeGrid also doesn't let me add a aura:id to the row.

Does anyone else know of a way I can access a specific row in the Tree Grid? 

Thanks!