-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
scope: tree viewChanges related to the tree view. This includes TreeView, TreeItem.Changes related to the tree view. This includes TreeView, TreeItem.status: waiting for maintainerThese issues haven't been looked at yet by a maintainer.These issues haven't been looked at yet by a maintainer.support: pro standardSupport request from a Pro standard plan user. https://mui.com/legal/technical-support-sla.Support request from a Pro standard plan user. https://mui.com/legal/technical-support-sla.
Description
Summary
The useSimpleTreeViewApiRef API should expose rootElementRef to get the root DOM node, similarly to what already exist in DataGrid component:
const apiRef = useGridApiContext();
const gridRoot = apiRef.current.rootElementRef?.current;
👉 There is no equivalent for const apiRef = useSimpleTreeViewApiRef();
Examples
No response
Motivation
I need this in order to find & highlight texts using a 3rd-party package react-css-highlight
It is far from ideal to manually create a ref just for that when useSimpleTreeViewApiRef already exists, without any props-drilling required.
Search keywords: tree root element ref
Order ID: 122317
Also, the docs are missing a page for explaining the available properties of the apiRef object returned from useSimpleTreeViewApiRef. Would be helpful...
Metadata
Metadata
Assignees
Labels
scope: tree viewChanges related to the tree view. This includes TreeView, TreeItem.Changes related to the tree view. This includes TreeView, TreeItem.status: waiting for maintainerThese issues haven't been looked at yet by a maintainer.These issues haven't been looked at yet by a maintainer.support: pro standardSupport request from a Pro standard plan user. https://mui.com/legal/technical-support-sla.Support request from a Pro standard plan user. https://mui.com/legal/technical-support-sla.