fix(tree-view): make first focusable node tabbable regardless of active/selected states

This commit is contained in:
Eric Y Liu 2021-07-14 09:54:01 -07:00
commit 48d4c0ba37

View file

@ -81,7 +81,6 @@
}
onMount(() => {
if ($activeNodeId !== $selectedNodeIds[0]) {
const firstFocusableNode = ref.querySelector(
"li.bx--tree-node:not(.bx--tree-node--disabled)"
);
@ -89,7 +88,6 @@
if (firstFocusableNode != null) {
firstFocusableNode.tabIndex = "0";
}
}
});
$: activeNodeId.set(activeId);