Prevent MenuItem firing onlick handlers when disabled

This commit is contained in:
Andrew Kingston 2021-08-24 15:29:50 +01:00
parent 6be1e0c828
commit 0516d3d0ef
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@
<li <li
data-cy={dataCy} data-cy={dataCy}
on:click|preventDefault={onClick} on:click|preventDefault={disabled ? null : onClick}
class="spectrum-Menu-item" class="spectrum-Menu-item"
class:is-disabled={disabled} class:is-disabled={disabled}
role="menuitem" role="menuitem"