Closed jochienabuurs closed 3 days ago
- Notice that "Fuchsia" visually has a selected state, even though it's not actually selected.
Actually it's "active" (active by keyboard/hovered by mouse) state. Colors for "selected" and "active" items are slightly different, but "active" state has higher priority that "selected" see screenshot:
If you repeat your steps, but before clearing fuchsia navigate to another item, you will see it works as it should
Thank you for the reply. Sorry for not using the correct terms. I meant the active state. I would expect the active state to be reset when all the input values are cleared.
I suppose this behaviour is intended, so I'm curious as to why this is working the way it does. I hope you find the time to explain.
You need to understand, we are talking about very specific example here (https://svelecte-v5.vercel.app/examples#multiselect) with specific combination of properties (keepSelectionInList
+ collapseSelection="always"
) where even some keyboard action doesn't work (Backspace and Ctrl+Backspace).
This is default behavior:
This issue is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 3 days.
When using the keyboard to select a value from a select, the visually selected state (managed by adding a .sv-dd-item-active class) does not get reset when the select is cleared.
See the first example: https://svelecte-v5.vercel.app/examples#multiselect
Steps to reproduce:
Even when using
highlightFirstItem={false}
anddisableHighlight={true}
this behavior does not change.Am I missing something? Do i manually need to remove the class altogether when no value is selected?