mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
Type id
as any in ComboBox
, Dropdown
, MultiSelect
(#1019)
Loosen the prop type for `id`, `selectedId` to be `any` instead of a `string`.
This commit is contained in:
parent
144eba1747
commit
1f7b5560a8
11 changed files with 68 additions and 49 deletions
6
types/MultiSelect/MultiSelect.svelte.d.ts
vendored
6
types/MultiSelect/MultiSelect.svelte.d.ts
vendored
|
@ -1,7 +1,7 @@
|
|||
/// <reference types="svelte" />
|
||||
import { SvelteComponentTyped } from "svelte";
|
||||
|
||||
export type MultiSelectItemId = string;
|
||||
export type MultiSelectItemId = any;
|
||||
|
||||
export type MultiSelectItemText = string;
|
||||
|
||||
|
@ -22,7 +22,7 @@ export interface MultiSelectProps
|
|||
* Override the display of a multiselect item
|
||||
* @default (item) => item.text || item.id
|
||||
*/
|
||||
itemToString?: (item: MultiSelectItem) => string;
|
||||
itemToString?: (item: MultiSelectItem) => any;
|
||||
|
||||
/**
|
||||
* Set the selected ids
|
||||
|
@ -210,7 +210,7 @@ export default class MultiSelect extends SvelteComponentTyped<
|
|||
MultiSelectProps,
|
||||
{
|
||||
select: CustomEvent<{
|
||||
selectedIds: string[];
|
||||
selectedIds: MultiSelectItemId[];
|
||||
selected: MultiSelectItem[];
|
||||
unselected: MultiSelectItem[];
|
||||
}>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue