I am using arrow key to navigate in TreeView in material ui using ReactJs which are the default keys. But I want to implement the tab keys to navigate in TreeView without hampering the default treeView behaviour.
<TreeView
className={classes.root1}
defaultExpandIcon={<ArrowDropDownIcon />}
defaultCollapseIcon={<ArrowDropUpIcon />}
disableSelection={true}
></TreeView>;
I just need to add tab key press to navigate between nodes. I have added tabIndex={0}. It works. But I don't need that because its hampering the default tab roving in treeview and I have to traverse the whole tree again from starting parent node.
The default behaiour is that when it leaves focus of treeView by tab press and if we press Shift+Tab key then it will go to last selected item.
I need to go to last selected item but without setting tabindex manually from my side.
Is this possible ? How can we achieve this ?