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:
Eric Liu 2022-01-20 18:50:36 -08:00 committed by GitHub
commit 1f7b5560a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 68 additions and 49 deletions

View file

@ -1,7 +1,8 @@
<script>
/**
* @typedef {{ id: string; text: string; }} ComboBoxItem
* @event {{ selectedId: string; selectedItem: ComboBoxItem }} select
* @typedef {any} ComboBoxItemId
* @typedef {{ id: ComboBoxItemId; text: string; }} ComboBoxItem
* @event {{ selectedId: ComboBoxItemId; selectedItem: ComboBoxItem }} select
*/
/**
@ -18,7 +19,7 @@
/**
* Set the selected item by value id
* @type {string}
* @type {ComboBoxItemId}
*/
export let selectedId = undefined;