mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
fix: allow numbers as item ids for ComboBox, Dropdown, MultiSelect
This commit is contained in:
parent
8950920a10
commit
392fc452e2
3 changed files with 3 additions and 3 deletions
|
@ -285,7 +285,7 @@
|
|||
</ListBoxField>
|
||||
{#if open}
|
||||
<ListBoxMenu aria-label="{ariaLabel}" id="{id}">
|
||||
{#each filteredItems as item, i (item.id || i)}
|
||||
{#each filteredItems as item, i (item.id)}
|
||||
<ListBoxMenuItem
|
||||
id="{item.id}"
|
||||
active="{selectedIndex === i || selectedId === item.id}"
|
||||
|
|
|
@ -235,7 +235,7 @@
|
|||
</button>
|
||||
{#if open}
|
||||
<ListBoxMenu aria-labelledby="{id}" id="{id}">
|
||||
{#each items as item, i (item.id || i)}
|
||||
{#each items as item, i (item.id)}
|
||||
<ListBoxMenuItem
|
||||
id="{item.id}"
|
||||
active="{selectedIndex === i || selectedId === item.id}"
|
||||
|
|
|
@ -420,7 +420,7 @@
|
|||
</ListBoxField>
|
||||
{#if open}
|
||||
<ListBoxMenu aria-label="{ariaLabel}" id="{id}">
|
||||
{#each filterable ? filteredItems : sortedItems as item, i (item.id || i)}
|
||||
{#each filterable ? filteredItems : sortedItems as item, i (item.id)}
|
||||
<ListBoxMenuItem
|
||||
id="{item.id}"
|
||||
active="{item.checked}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue