Prevent MenuItem firing onlick handlers when disabled

This commit is contained in:
Andrew Kingston 2021-08-24 15:29:50 +01:00
parent 0a12089a54
commit dca9d5665a
1 changed files with 1 additions and 1 deletions

View File

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