Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

fix event propagation on notes expand button

Jean-Baptiste Kaiser1af838d694a5
diff --git a/src/components/atomic-crm/notes/Note.tsx b/src/components/atomic-crm/notes/Note.tsx
index 38b4ce27..05702edd 100644
--- a/src/components/atomic-crm/notes/Note.tsx
+++ b/src/components/atomic-crm/notes/Note.tsx
@@ -199,7 +199,10 @@ export const Note = ({
)}
{isTruncated && (
<button
- onClick={() => setExpanded(!isExpanded)}
+ onClick={(e) => {
+ e.stopPropagation();
+ setExpanded(!isExpanded);
+ }}
className="text-primary text-sm mt-1 underline hover:no-underline cursor-pointer"
>
{isExpanded ? "Show less" : "Read more"}