With the API I managed to get this.template.querySelector("lightning-tree-grid"), but getting to any inner element returns empty proxy object. With the browser console I manage to find the required:


But, unable to reach it in code. Is it possible?

https://developer.salesforce.com/docs/component-library/bundle/lightning-datatable/documentation https://developer.salesforce.com/docs/component-library/bundle/lightning-tree-grid/documentation

  • not really, to find the the lightning-tree-grid is not a problem, the problem is to enter inside a component.
    – AlexS
    Nov 30, 2020 at 9:02

1 Answer 1


You cannot do this because of the Locker Service:

A component can only traverse the DOM and access elements created by a component in the same namespace. This behavior prevents the anti-pattern of reaching into DOM elements owned by components in another namespace.

All standard lightning components are outside your namespace.

Not the answer you're looking for? Browse other questions tagged .