mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-20 12:23:02 +00:00
feat(multi-select): type id as any
This commit is contained in:
parent
101fd9ca88
commit
0c0e0c4e81
1 changed files with 3 additions and 3 deletions
|
@ -1,9 +1,9 @@
|
||||||
<script>
|
<script>
|
||||||
/**
|
/**
|
||||||
* @typedef {string} MultiSelectItemId
|
* @typedef {any} MultiSelectItemId
|
||||||
* @typedef {string} MultiSelectItemText
|
* @typedef {string} MultiSelectItemText
|
||||||
* @typedef {{ id: MultiSelectItemId; text: MultiSelectItemText; }} MultiSelectItem
|
* @typedef {{ id: MultiSelectItemId; text: MultiSelectItemText; }} MultiSelectItem
|
||||||
* @event {{ selectedIds: string[]; selected: MultiSelectItem[]; unselected: MultiSelectItem[]; }} select
|
* @event {{ selectedIds: MultiSelectItemId[]; selected: MultiSelectItem[]; unselected: MultiSelectItem[]; }} select
|
||||||
* @event {any} clear
|
* @event {any} clear
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the display of a multiselect item
|
* Override the display of a multiselect item
|
||||||
* @type {(item: MultiSelectItem) => string}
|
* @type {(item: MultiSelectItem) => any}
|
||||||
*/
|
*/
|
||||||
export let itemToString = (item) => item.text || item.id;
|
export let itemToString = (item) => item.text || item.id;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue