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] Add file explorer example to rich tree view customization docs #12707
[docs] Add file explorer example to rich tree view customization docs #12707
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that you migrated the component almost as-is from the SimpleTreeView
so the issue does not come from this PR per say.
But I'm not convinced that this example is similar to something people would actually implement.
It looks nice, but if you were building a real file explorer, you would not have the icon
defined like this as React component in your dataset.
In which type of application do you think we would see this kind of example?
@flaviendelangle You are probably right 🤔 Maybe defining the |
Yes that's what I had in mind. let icon;
if (isExpandable) icon = folderIcon
else if (item.fileType) icon = getIconFromFileType(item.fileType)
else icon = defaultFileIcon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great ! 🥳
</TreeItem2IconContainer> | ||
|
||
<CustomLabel | ||
{...getLabelProps()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can pass the additional props as a param of getLabelProps
to be consistent
Part of #12436