fix(multi-select): type clear as a custom event

This commit is contained in:
Eric Y Liu 2021-03-19 06:47:50 -07:00
commit 4c8c9be28e
4 changed files with 11 additions and 10 deletions

View file

@ -1,4 +1,12 @@
<script>
/**
* @typedef {string} MultiSelectItemId
* @typedef {string} MultiSelectItemText
* @typedef {{ id: MultiSelectItemId; text: MultiSelectItemText; }} MultiSelectItem
* @event {{ selectedIds: string[]; selected: MultiSelectItem[]; unselected: MultiSelectItem[]; }} select
* @event {any} clear
*/
/**
* Set the multiselect items
* @type {MultiSelectItem[]}
@ -117,13 +125,6 @@
*/
export let name = undefined;
/**
* @typedef {string} MultiSelectItemId
* @typedef {string} MultiSelectItemText
* @typedef {{ id: MultiSelectItemId; text: MultiSelectItemText; }} MultiSelectItem
* @event {{ selectedIds: string[]; selected: MultiSelectItem[]; unselected: MultiSelectItem[]; }} select
*/
import { afterUpdate, createEventDispatcher, setContext } from "svelte";
import WarningFilled16 from "carbon-icons-svelte/lib/WarningFilled16/WarningFilled16.svelte";
import WarningAltFilled16 from "carbon-icons-svelte/lib/WarningAltFilled16/WarningAltFilled16.svelte";