mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
feat(Dropdown): selectedIndex -> selectedId (#1004)
* feat(breaking): selectedIndex -> selectedId in Dropdown * feat: omit `selectedIndex` from the `select` event
This commit is contained in:
parent
37f10ad1a2
commit
e11a893bee
7 changed files with 53 additions and 52 deletions
6
types/Dropdown/Dropdown.svelte.d.ts
vendored
6
types/Dropdown/Dropdown.svelte.d.ts
vendored
|
@ -25,10 +25,9 @@ export interface DropdownProps
|
|||
itemToString?: (item: DropdownItem) => string;
|
||||
|
||||
/**
|
||||
* Specify the selected item index
|
||||
* @default -1
|
||||
* Specify the selected item id
|
||||
*/
|
||||
selectedIndex?: number;
|
||||
selectedId?: DropdownItemId;
|
||||
|
||||
/**
|
||||
* Specify the type of dropdown
|
||||
|
@ -146,7 +145,6 @@ export default class Dropdown extends SvelteComponentTyped<
|
|||
{
|
||||
select: CustomEvent<{
|
||||
selectedId: DropdownItemId;
|
||||
selectedIndex: number;
|
||||
selectedItem: DropdownItem;
|
||||
}>;
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue