mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
parent
0bdae666c4
commit
d9262ce933
28 changed files with 410 additions and 138 deletions
|
@ -27,19 +27,17 @@
|
|||
tabindex={disabled ? '-1' : '0'}
|
||||
title={description}
|
||||
class={cx('--list-box__selection', selectionCount && '--tag--filter', selectionCount && '--list-box__selection--multi', className)}
|
||||
on:click
|
||||
on:click|stopPropagation={event => {
|
||||
on:click|preventDefault|stopPropagation={event => {
|
||||
if (!disabled) {
|
||||
dispatch('clear', event);
|
||||
}
|
||||
}}
|
||||
on:keydown
|
||||
on:keydown|stopPropagation={event => {
|
||||
if (!disabled && event.key === 'Enter') {
|
||||
dispatch('clear', event);
|
||||
}
|
||||
}}
|
||||
{style}>
|
||||
{selectionCount}
|
||||
<Close16 />
|
||||
{#if selectionCount}{selectionCount}{/if}
|
||||
<Close16 focusable="false" tabindex="-1" />
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue