From 26299e3cdfd04925689de875f1194986fe148506 Mon Sep 17 00:00:00 2001 From: csawatzky Date: Thu, 15 May 2025 09:25:09 -0600 Subject: [PATCH] fix for component cards switch prevent default was stoppgin the onChange from firing properly --- src/component/ComponentActions.tsx | 2 +- src/component/ComponentCard.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/component/ComponentActions.tsx b/src/component/ComponentActions.tsx index f633240..8821353 100644 --- a/src/component/ComponentActions.tsx +++ b/src/component/ComponentActions.tsx @@ -140,7 +140,7 @@ export default function ComponentActions(props: Props) { {canEdit && ( { openComponentSettingsDialog("remove") - closeMoreMenu() + setAnchorEl(null) }}> diff --git a/src/component/ComponentCard.tsx b/src/component/ComponentCard.tsx index 19482bc..a2231a6 100644 --- a/src/component/ComponentCard.tsx +++ b/src/component/ComponentCard.tsx @@ -254,15 +254,15 @@ export default function ComponentCard(props: Props) { size="small" onTouchStart={event => { event.stopPropagation(); - event.preventDefault(); + //event.preventDefault(); }} onMouseDown={event => { event.stopPropagation(); - event.preventDefault(); + //event.preventDefault(); }} onClick={event => { event.stopPropagation(); - event.preventDefault(); + //event.preventDefault(); }} disabled={!canEdit} onChange={(_, checked) => updateControllerState(checked)}