Replies: 2 comments 1 reply
-
Hi @Lukinoh, this is indeed something that should not happen, so I'd say it is a bug. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Apologies for not updating this thread the other day! This was fixed in #1430, which will be available in the next release. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I was wondering why do we focus the first available item when we remove the selected item ?
shoelace/src/components/tree/tree.ts
Lines 166 to 169 in 5f4de6d
Just to give a bit of context, I have a tree with a list of items, and based on a input search, the tree is filtered.
However, the behaviour is quite strange due to those lines.
When the selected item is removed from the list, it focuses the first element, and the focus of the input is lost, which is not very practical.
You can find a reproduction here.
To simplify the implementation, I just remove all the items, and add the filtered one, hence the behaviour happens each time.
Best regards.
Beta Was this translation helpful? Give feedback.
All reactions