mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
parent
ceb7abf2e9
commit
2858776367
7 changed files with 57 additions and 5 deletions
|
@ -3,6 +3,7 @@
|
|||
* @typedef {any} ComboBoxItemId
|
||||
* @typedef {{ id: ComboBoxItemId; text: string; }} ComboBoxItem
|
||||
* @event {{ selectedId: ComboBoxItemId; selectedItem: ComboBoxItem }} select
|
||||
* @slot {{ item: ComboBoxItem; index: number }}
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -363,7 +364,9 @@
|
|||
highlightedIndex = i;
|
||||
}}"
|
||||
>
|
||||
{itemToString(item)}
|
||||
<slot item="{item}" index="{i}">
|
||||
{itemToString(item)}
|
||||
</slot>
|
||||
{#if selectedItem && selectedItem.id === item.id}
|
||||
<Checkmark16 class="bx--list-box__menu-item__selected-icon" />
|
||||
{/if}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue