TreeView programmatic focus does not change tab indices #20141
Labels
bug 🐛
Something doesn't work
component: tree view
TreeView, TreeItem. This is the name of the generic UI component, not the React module!
Current Behavior 😯
Call focus() on a tree item it does not affect the isTabbable of the newly focused tree item or any of the others.
Expected Behavior 🤔
The newly focused tree item has tabindex 0 and the previously focused has tabIndex -1
Steps to Reproduce 🕹
https://codesandbox.io/s/elastic-snow-ut9t7
Steps:
https://github.com/mui-org/material-ui/blob/70c937d92dea4bd794164b4d75f75c1a84217363/packages/material-ui-lab/src/TreeItem/TreeItem.js#L331)
The tabbable variable prevents the expected behaviour.
Is this some hacky way to circumvent React ?
The text was updated successfully, but these errors were encountered: