mui / mui-x

MUI X: Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, and more!
https://mui.com/x/
4.11k stars 1.27k forks source link

[tree view] Context menu on Rich Tree View #11267

Open joserodolfofreitas opened 10 months ago

joserodolfofreitas commented 10 months ago

Summary 💡

Users can currently implement a context menu on userland when using JSX children, but having it out of the box would be great, especially considering our newest addition: items prop.

First requested by https://mui.zendesk.com/agent/tickets/14753

Examples 🌈

Search keywords: context menu

oliviertassinari commented 10 months ago

Why should this be supported out of the box? How is composition with a dedicated context menu component not a superior approach?

We have https://mui.com/material-ui/react-menu/#context-menu but we could do better for a dedicated context component. I think we should start there. Only once we have a good context menu component, expand.

joserodolfofreitas commented 10 months ago

Why should this be supported out of the box?

We bring value by solving common pain points for the users, making it easier / painless as possible to add this feature to their application.

Also, if you're using the current tree view, you can do it entirely on userland, but with the future RichTreeView and items prop, this won't be as straightforward.