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

[TreeView] Add publicAPI method to disable items #16743

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

noraleonte
Copy link
Contributor

@noraleonte noraleonte commented Feb 26, 2025

I'm proposing to add a publicAPI method to the Tree View, to allow users to imperatively disable an item. A very common use case is when you have a lock icon, and the item is disabled/enabled when clicking on it.

Discovered the need for this while working on #16744

@noraleonte noraleonte added the component: tree view TreeView, TreeItem. This is the name of the generic UI component, not the React module! label Feb 26, 2025
@mui-bot
Copy link

mui-bot commented Feb 26, 2025

Copy link
Member

@flaviendelangle flaviendelangle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super nice new feature 👌

Copy link
Member

@flaviendelangle flaviendelangle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you can add a few basic tests it would be awesome 🙏

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!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants