ListItemButton
will not set DOM disabled
attribute
#35779
Labels
component: button
This is the name of the generic UI component, not the React module!
status: expected behavior
Does not imply the behavior is intended. Just that we know about it and can't work around it
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example: https://codesandbox.io/s/mui-list-item-button-not-disabled-yzqz67
Steps:
3.the ListItemButton only has aria-disabled attribute. Styles are correct.
Current behavior 😯
The ListItemButton does not apply the disabled attribute to the DOM element when disabled via prop.
Expected behavior 🤔
Just like the mui Button component the disabled attribute is set in DOM.
If this is expected behaviour I would expect this to be documented.
Context 🔦
This came up during component testing.
expect(component).toBeDisabled();
will throw.Your environment 🌎
System:
OS: Windows 10 10.0.22000
Binaries:
Node: 16.19.0
Yarn: 3.2.0
npm: 8.19.3
Browsers:
Chrome: Not Found
Edge: Spartan (44.22000.120.0), Chromium (108.0.1462.54)
The text was updated successfully, but these errors were encountered: