mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
feat(multi-select): forward "on:clear" event
This commit is contained in:
parent
956b316009
commit
a016bf897c
3 changed files with 23 additions and 11 deletions
|
@ -169,11 +169,10 @@
|
|||
let fieldRef = null;
|
||||
let selectionRef = null;
|
||||
let inputRef = null;
|
||||
|
||||
$: inputValue = "";
|
||||
$: initialSorted = false;
|
||||
$: highlightedIndex = -1;
|
||||
$: prevChecked = [];
|
||||
let inputValue = "";
|
||||
let initialSorted = false;
|
||||
let highlightedIndex = -1;
|
||||
let prevChecked = [];
|
||||
|
||||
setContext("MultiSelect", {
|
||||
declareRef: ({ key, ref }) => {
|
||||
|
@ -335,6 +334,7 @@
|
|||
{#if checked.length > 0}
|
||||
<ListBoxSelection
|
||||
selectionCount="{checked.length}"
|
||||
on:clear
|
||||
on:clear="{() => {
|
||||
sortedItems = sortedItems.map((item) => ({
|
||||
...item,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue