mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
fix(tree-view): make first node focusable if activeId does not match selected
This commit is contained in:
parent
2b9e614e48
commit
b0843505e7
1 changed files with 1 additions and 1 deletions
|
@ -81,7 +81,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
if ($activeNodeId === "") {
|
if ($activeNodeId !== $selectedNodeIds[0]) {
|
||||||
const firstFocusableNode = ref.querySelector(
|
const firstFocusableNode = ref.querySelector(
|
||||||
"li.bx--tree-node:not(.bx--tree-node--disabled)"
|
"li.bx--tree-node:not(.bx--tree-node--disabled)"
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue