Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tree view] Add virtualization support #9685

Open
rashdeva opened this issue May 8, 2020 · 14 comments · May be fixed by #13520
Open

[tree view] Add virtualization support #9685

rashdeva opened this issue May 8, 2020 · 14 comments · May be fixed by #13520
Assignees
Labels
component: tree view TreeView, TreeItem. This is the name of the generic UI component, not the React module! new feature New feature or request performance plan: Pro Impact at least one Pro user

Comments

@rashdeva
Copy link

rashdeva commented May 8, 2020

Tree View doesn't support virtualization for long-list items. It will be nice to have this feature.

Summary 💡

To maintain consistency with Autocomplete, it's better to use react-window as a virtualization library. To keep the current API, the Tree View component should merge items to flat list and by using indents present items. (https://material-ui.com/components/lists/#nested-list)

Motivation 🔦

Most of the time tree view uses for long lists and structured data. If the parent item has 1000 children, the performance slows down.

Other requests

Benchmarks

@oliviertassinari oliviertassinari added the component: tree view TreeView, TreeItem. This is the name of the generic UI component, not the React module! label May 8, 2020
@oliviertassinari oliviertassinari changed the title Tree View Virtualization [TreeView] Add virtualization support Jun 16, 2020
@oliviertassinari oliviertassinari added the new feature New feature or request label Jun 16, 2020
@harrycollin

This comment was marked as resolved.

@david-ic3
Copy link

david-ic3 commented Feb 14, 2022

@oliviertassinari Using the DataGridPro with Tree Data solves the performance issue for very large trees? Is this the way?

@naxis18

This comment was marked as duplicate.

@davidpenso

This comment was marked as duplicate.

@davidpenso

This comment was marked as duplicate.

@CHE1RON

This comment was marked as resolved.

@oliviertassinari
Copy link
Member

oliviertassinari commented Jul 15, 2023

Using the DataGridPro with Tree Data solves the performance issue for very large trees?

@david-ic3 the data grid could indeed be used this way, and solve the performance issue with large tree. However, https://mui.com/x/react-data-grid/tree-data/ implements the role="treegrid" which isn't the same as role="treeview":

So for a tree view like the VS Code file browser, this would have its limits (I don't know each enough to say what are the true differences).


I have transferred this issue to MUI X, per https://mui.com/material-ui/discover-more/roadmap/.

@oliviertassinari oliviertassinari transferred this issue from mui/material-ui Jul 15, 2023
@joserodolfofreitas joserodolfofreitas added the plan: Pro Impact at least one Pro user label Jul 17, 2023
@MpStyle
Copy link

MpStyle commented Feb 25, 2024

Waiting for an official implementation, I attempted to implement a tree view with virtualization using react-virtualized-auto-sizer and react-window.
The data model is flat, and the depth is determined by a property (depth).
The React components are Material-UI components.
If anyone is interested, you can find it here:
src/component/common/tree-view

@sauron918
Copy link

Since the virtualization support is already on the MUI X public roadmap with a label Plan: Pro, should we expect that virtualization will be available for the Pro version only?

@oliviertassinari
Copy link
Member

oliviertassinari commented Oct 27, 2024

should we expect that virtualization will be available for the Pro version only?

@sauron918 Correct. Per our research (see issue description benchmark), the range of options available is slim, too often those efforts get abandoned. The dream is to bring the amazing VS Code tree view to React. See https://www.reddit.com/r/reactjs/comments/16vt1vv/react_component_needed_virtual_trees_w_drag_and/ for an interesting thread on this.

So it seems that if we license this MIT, we won't be able to make it work long-term (not enough donations, sponsoring, ad revenue, etc.). So we need a commercial license. I think this was borderline to land under the Premium plan (close to no open-source alternatives) but Pro feels less greedy, so more "right".

@itayG98
Copy link
Contributor

itayG98 commented Nov 18, 2024

Hello, I just wanted to ask if there any estimation to publish data for the virtual-tree at the pro plan? :)

@flaviendelangle
Copy link
Member

flaviendelangle commented Nov 18, 2024

@itayG98 We are aiming for an initial release of the virtualization in @mui/x-tree-view-pro for the launch of MUI X v8.0.0, probably in March 2025. The feature might be ready sooner as part of the v8 beta.

See https://mui.com/blog/mui-x-v8-alpha-zero/.

@hazelraidoninc
Copy link

@itayG98 We are aiming for an initial release of the virtualization in @mui/x-tree-view-pro for the launch of MUI X v8.0.0, probably in March 2025. The feature might be ready sooner as part of the v8 beta.

Would really love to see this as soon as possible!

@itayG98
Copy link
Contributor

itayG98 commented Nov 25, 2024

@itayG98 We are aiming for an initial release of the virtualization in @mui/x-tree-view-pro for the launch of MUI X v8.0.0, probably in March 2025. The feature might be ready sooner as part of the v8 beta.

Great ! I wish you luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: tree view TreeView, TreeItem. This is the name of the generic UI component, not the React module! new feature New feature or request performance plan: Pro Impact at least one Pro user
Projects
Status: In progress now
Development

Successfully merging a pull request may close this issue.