aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/components
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web/components')
-rw-r--r--apps/web/components/dashboard/tags/TagPill.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/web/components/dashboard/tags/TagPill.tsx b/apps/web/components/dashboard/tags/TagPill.tsx
index 81d700cd..2da97b2e 100644
--- a/apps/web/components/dashboard/tags/TagPill.tsx
+++ b/apps/web/components/dashboard/tags/TagPill.tsx
@@ -1,4 +1,4 @@
-import React, { useState } from "react";
+import React, { useRef, useState } from "react";
import Link from "next/link";
import { Button } from "@/components/ui/button";
import { Separator } from "@/components/ui/separator";
@@ -23,6 +23,7 @@ export function TagPill({
onOpenDialog: (tag: { id: string; name: string }) => void;
}) {
const [isHovered, setIsHovered] = useState(false);
+ const draggableRef = useRef<HTMLDivElement>(null);
const handleMouseOver = () => setIsHovered(true);
const handleMouseOut = () => setIsHovered(false);
@@ -74,6 +75,7 @@ export function TagPill({
onFocus={handleMouseOver}
onMouseOut={handleMouseOut}
onBlur={handleMouseOut}
+ ref={draggableRef}
>
<Link
className={
@@ -111,6 +113,7 @@ export function TagPill({
disabled={!isDraggable}
defaultClassNameDragging={"position-relative z-10 pointer-events-none"}
position={{ x: 0, y: 0 }}
+ nodeRef={draggableRef}
>
{pill}
</Draggable>