mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
feat(ComboBox): selectedIndex -> selectedId (#1016)
* feat(breaking): selectedIndex -> selectedId in ComboBox * docs: update ComboBox
This commit is contained in:
parent
e11a893bee
commit
cde8a79fa8
9 changed files with 91 additions and 102 deletions
11
types/ComboBox/ComboBox.svelte.d.ts
vendored
11
types/ComboBox/ComboBox.svelte.d.ts
vendored
|
@ -21,10 +21,9 @@ export interface ComboBoxProps
|
|||
itemToString?: (item: ComboBoxItem) => string;
|
||||
|
||||
/**
|
||||
* Set the selected item by value index
|
||||
* @default -1
|
||||
* Set the selected item by value id
|
||||
*/
|
||||
selectedIndex?: number;
|
||||
selectedId?: string;
|
||||
|
||||
/**
|
||||
* Specify the selected combobox value
|
||||
|
@ -141,11 +140,7 @@ export interface ComboBoxProps
|
|||
export default class ComboBox extends SvelteComponentTyped<
|
||||
ComboBoxProps,
|
||||
{
|
||||
select: CustomEvent<{
|
||||
selectedId: string;
|
||||
selectedIndex: number;
|
||||
selectedItem: ComboBoxItem;
|
||||
}>;
|
||||
select: CustomEvent<{ selectedId: string; selectedItem: ComboBoxItem }>;
|
||||
keydown: WindowEventMap["keydown"];
|
||||
keyup: WindowEventMap["keyup"];
|
||||
focus: WindowEventMap["focus"];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue