mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-20 12:23:02 +00:00
fix(Dropdown): list icon was clickable in disabled state
This commit is contained in:
parent
37f10ad1a2
commit
d8a04f98ca
1 changed files with 9 additions and 1 deletions
|
@ -226,7 +226,15 @@
|
|||
<span class="bx--list-box__label">
|
||||
{#if selectedItem}{itemToString(selectedItem)}{:else}{label}{/if}
|
||||
</span>
|
||||
<ListBoxMenuIcon open="{open}" translateWithId="{translateWithId}" />
|
||||
<ListBoxMenuIcon
|
||||
on:click="{(e) => {
|
||||
e.stopPropagation();
|
||||
if (disabled) return;
|
||||
open = !open;
|
||||
}}"
|
||||
translateWithId="{translateWithId}"
|
||||
open="{open}"
|
||||
/>
|
||||
</button>
|
||||
{#if open}
|
||||
<ListBoxMenu aria-labelledby="{id}" id="{id}">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue