diff --git a/src/ComboBox/ComboBox.svelte b/src/ComboBox/ComboBox.svelte index c41779c5..f370dae9 100644 --- a/src/ComboBox/ComboBox.svelte +++ b/src/ComboBox/ComboBox.svelte @@ -129,10 +129,6 @@ filteredItems = items.filter((item) => shouldFilterItem(item, value)); } else { highlightedIndex = -1; - - if (!selectedItem) { - selectedIndex = 0; - } } }); @@ -148,7 +144,7 @@ : undefined; $: filteredItems = items.filter((item) => shouldFilterItem(item, value)); $: selectedItem = items[selectedIndex]; - $: inputValue = selectedItem ? selectedItem.text : undefined; + $: inputValue = selectedItem ? selectedItem.text : ""; $: value = inputValue;