Skip to content

Commit b332c91

Browse files
committed
fix
1 parent 33762ff commit b332c91

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/plate-ui/draggable.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
} from '@udecode/plate-dnd';
1919
import { BlockSelectionPlugin } from '@udecode/plate-selection/react';
2020

21+
import { useMounted } from '@/hooks/use-mounted';
2122
import { Icons } from '@/components/icons';
2223

2324
import {
@@ -59,6 +60,7 @@ export const Draggable = withHOC(
5960
const state = useDraggableState({ element, onDropHandler });
6061
const { isDragging } = state;
6162
const { previewRef, handleRef } = useDraggable(state);
63+
const mounted = useMounted();
6264

6365
return (
6466
<div
@@ -81,7 +83,7 @@ export const Draggable = withHOC(
8183
<div
8284
ref={handleRef}
8385
className="size-4"
84-
data-key={element.id as string}
86+
data-key={mounted ? (element.id as string) : undefined}
8587
>
8688
<DragHandle />
8789
</div>

0 commit comments

Comments
 (0)