fix(Dropdown): list icon was clickable in disabled state

This commit is contained in:
István Pató 2022-01-18 13:34:35 +01:00
commit d8a04f98ca
No known key found for this signature in database
GPG key ID: 3A842123BFF8E969

View file

@ -226,7 +226,15 @@
<span class="bx--list-box__label"> <span class="bx--list-box__label">
{#if selectedItem}{itemToString(selectedItem)}{:else}{label}{/if} {#if selectedItem}{itemToString(selectedItem)}{:else}{label}{/if}
</span> </span>
<ListBoxMenuIcon open="{open}" translateWithId="{translateWithId}" /> <ListBoxMenuIcon
on:click="{(e) => {
e.stopPropagation();
if (disabled) return;
open = !open;
}}"
translateWithId="{translateWithId}"
open="{open}"
/>
</button> </button>
{#if open} {#if open}
<ListBoxMenu aria-labelledby="{id}" id="{id}"> <ListBoxMenu aria-labelledby="{id}" id="{id}">