aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2025-09-14 09:48:52 +0000
committerMohamed Bassem <me@mbassem.com>2025-09-14 09:49:18 +0000
commitd173b101e3c9d48d59d380f4433dbea53dae5c89 (patch)
treed11d9b34a9903b44af1f5ac97ed2e0c4659b67e9 /apps
parent820b7e655a670cf8b8e3f7ad8bb1eb487ee20405 (diff)
downloadkarakeep-d173b101e3c9d48d59d380f4433dbea53dae5c89.tar.zst
fix(web): fix error when attempting to merge tags. fixes #1938
Diffstat (limited to 'apps')
-rw-r--r--apps/web/components/dashboard/tags/TagPill.tsx5
-rw-r--r--apps/web/package.json2
2 files changed, 5 insertions, 2 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>
diff --git a/apps/web/package.json b/apps/web/package.json
index 7e9fe9d9..c18884cb 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -78,7 +78,7 @@
"react": "^19.1.0",
"react-day-picker": "^9.7.0",
"react-dom": "^19.1.0",
- "react-draggable": "^4.4.6",
+ "react-draggable": "^4.5.0",
"react-dropzone": "^14.2.3",
"react-error-boundary": "^5.0.0",
"react-hook-form": "^7.57.0",