question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[TreeView] Updating `disabled` prop of `TreeItem` doesn't update the styling immediately

See original GitHub issue

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

When updating the disabled property on the TreeView component, the disabled class does not get applied immediately. It appears it doesn’t update until the next render.

Expected behavior 🤔

Disabled styles should update as soon as the disabled prop changes.

Steps to reproduce 🕹

Code Sandbox Example

Steps:

  1. Click the disable button
  2. Item One should update, but doesn’t.
  3. Click anywhere in the tree and the styles will then update.

Context 🔦

No response

Your environment 🌎

`npx @mui/envinfo`
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Moizsohailcommented, Jun 4, 2022

@benjamhawk this is not an answer to your question. I just looked it up and leaving it here for the maintainers.

0reactions
github-actions[bot]commented, Jul 28, 2022

👋 Thanks for using MUI Core!

We use GitHub issues exclusively as a bug and feature requests tracker, however, this issue appears to be a support request.

For support, please check out https://mui.com/getting-started/support/. Thanks!

If you have a question on Stack Overflow, you are welcome to link to it here, it might help others. If your issue is subsequently confirmed as a bug, and the report follows the issue template, it can be reopened.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TreeView / TreeItem value changes not visible — oracle-tech
TreeView already updates itself when the visible TreeItem values are updated. I just verified it locally by writing a simple test application ...
Read more >
Update TreeView on custom TreeItem property change
I have extended TreeCell and TreeItem class. MyTreeItem contains a custom property which I use inside MyTreeCell to render graphics/font etc.
Read more >
Navigation Treeview Example | APG | WAI - W3C
A tree item that can be expanded to reveal child items is called a parent node. It is a closed node when the...
Read more >
Safari Technology Preview Release Notes - Apple Developer
Fixed dynamic aria-disabled changes not updating enabled status for ... Fixed the display property value of a computed style to be "none" instead...
Read more >
TreeView (JavaFX 17)
The TreeView control provides a view on to a tree root (of type TreeItem ). ... Calling refresh() forces the TreeView control to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found