mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
fix(ComboBox): change default behaviour, when typed value doesn't match
This commit is contained in:
parent
a965f3193c
commit
32457cf0ed
1 changed files with 2 additions and 2 deletions
|
@ -307,9 +307,9 @@
|
|||
filteredItems.find(
|
||||
(e) =>
|
||||
e.text.toLowerCase() === value?.toLowerCase() && !e.disabled
|
||||
) ?? filteredItems.find((e) => !e.disabled);
|
||||
);
|
||||
if (matchedItem) {
|
||||
// typed value has matched or fallback to first enabled item
|
||||
// typed value has matched or remains unchanged
|
||||
open = false;
|
||||
selectedItem = matchedItem;
|
||||
value = itemToString(selectedItem);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue