diff --git a/apps/desktop/src/renderer/src/components/data-table.tsx b/apps/desktop/src/renderer/src/components/data-table.tsx index e226ae3..bf46896 100644 --- a/apps/desktop/src/renderer/src/components/data-table.tsx +++ b/apps/desktop/src/renderer/src/components/data-table.tsx @@ -186,8 +186,13 @@ const MaskedCell = React.memo(function MaskedCell({ if (!isMasked) return <>{children} - const handleMouseEnter = (e: React.MouseEvent) => { - if (hoverToPeek && e.altKey) setPeeking(true) + const handleMouseMove = (e: React.MouseEvent) => { + if (!hoverToPeek) return + if (e.altKey) { + if (!peeking) setPeeking(true) + } else if (peeking) { + setPeeking(false) + } } const handleMouseLeave = () => setPeeking(false) @@ -195,7 +200,8 @@ const MaskedCell = React.memo(function MaskedCell({ return ( diff --git a/apps/desktop/src/renderer/src/components/editable-data-table.tsx b/apps/desktop/src/renderer/src/components/editable-data-table.tsx index 651f96d..f8126d3 100644 --- a/apps/desktop/src/renderer/src/components/editable-data-table.tsx +++ b/apps/desktop/src/renderer/src/components/editable-data-table.tsx @@ -125,8 +125,13 @@ function MaskedEditCell({ }) { const [peeking, setPeeking] = React.useState(false) - const handleMouseEnter = (e: React.MouseEvent) => { - if (hoverToPeek && e.altKey) setPeeking(true) + const handleMouseMove = (e: React.MouseEvent) => { + if (!hoverToPeek) return + if (e.altKey) { + if (!peeking) setPeeking(true) + } else if (peeking) { + setPeeking(false) + } } const handleMouseLeave = () => setPeeking(false) @@ -134,9 +139,10 @@ function MaskedEditCell({ return ( {children}