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

[docs][Tree View] Add "Common examples" on the RichTreeView customization page #12436

Open
flaviendelangle opened this issue Mar 13, 2024 · 5 comments
Assignees
Labels
component: tree view TreeView, TreeItem. This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation

Comments

@flaviendelangle
Copy link
Member

flaviendelangle commented Mar 13, 2024

The goal is to have good looking "Common examples" where the component used (SimpleTreeView or RichTreeView) is always the one people should use for this specific use-case

Search keywords:

@flaviendelangle flaviendelangle added docs Improvements or additions to the documentation component: tree view TreeView, TreeItem. This is the name of the generic UI component, not the React module! labels Mar 13, 2024
@Ruffeng
Copy link

Ruffeng commented May 16, 2024

It would be great to have some documentation on how to correctly use TreeItem2. I am trying to implement a lazy loading TreeItem2 and I can only see the file explorer example with it for open customization, but no explanation on what is doing any of the components or even the hook.
Additionally, would be great as well to be able to provide a prop like hasChildren as a boolean. Internally only reading an array of children makes it quite rigid to achieve this lazy loading approach.

@flaviendelangle
Copy link
Member Author

Hi,

We clearly need more documentation around useTreeItem2 and TreeItem2.

Additionally, would be great as well to be able to provide a prop like hasChildren as a boolean. Internally only reading an array of children makes it quite rigid to achieve this lazy loading approach.

We aim at supporting lazy loading in the RichTreeView component, with a better DX than right now (which require a lot of hacky code).
The main issue for this new feature is #9687

@Ruffeng
Copy link

Ruffeng commented May 16, 2024

Thanks for your quick answer @flaviendelangle . I will keep an eye on that issue, even though they are not aimed to be solved with the TreeItem2 yet.

@flaviendelangle
Copy link
Member Author

By the way, TreeItem2 will eventually become the only Tree Item component (it will replace TreeItem).
So any new feature will be compatible with TreeItem2 (the opposite might now always be true depending on the complexity to support both.

@Ruffeng
Copy link

Ruffeng commented May 16, 2024

That's what I read in the docs. This is the reason why I am trying to do a lazy loading Rich tree view with TreeItem2 instead of the old one. If I come up with any success I will try to provide a gist to achieve such goal in case someone else needs to implement it and wants to use TreeItem2(until is officially supported for lazy loading).

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! docs Improvements or additions to the documentation
Projects
None yet
Development

No branches or pull requests

4 participants