Skip to content

[tree view] Trigger manual refresh of lazy loaded children & check parent expansion #18200

@jw3n

Description

@jw3n

The problem in depth

The lazy loading variant of the MUI RichTreeViewPro component seems to have huge potential to improve code quality and maintainability of the large tree structures. Nevertheless two major problems occurred regarding live updates of the data in the tree:

  • There is no possibility to trigger a refresh via api to tell a parent node to reload its children. The only way this could be achieved at the moment is via collapsing and expanding the node via the tree api. But this leads to a bad user experience in the UI
  • There is no way to check via the tree api if a node is expanded at the moment or not. This is necessary to determine if a reload has to be triggered for a given parent

Are there any workarounds to achieve the described behavior and/or is it planned to introduce this functionality?

Your environment

`npx @mui/envinfo`
  System:
    OS: Windows 11 10.0.26100
  Binaries:
    Node: 20.11.0 - ~\AppData\Local\Volta\tools\image\node\20.11.0\node.EXE
    npm: 10.2.4 - ~\AppData\Local\Volta\tools\image\node\20.11.0\npm.CMD
    pnpm: Not Found
  Browsers:
    Chrome: Not Found
    Edge: Chromium (136.0.3240.50)

Search keywords: lazy-loading, richt-tree-view, trigger refresh

Order ID: 100621

Metadata

Metadata

Labels

scope: tree viewChanges related to the tree view. This includes TreeView, TreeItem.support: commercialSupport request from paid users.support: pro standardSupport request from a Pro standard plan user. https://mui.com/legal/technical-support-sla.type: new featureExpand the scope of the product to solve a new problem.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions