File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import {
18
18
} from '@udecode/plate-dnd' ;
19
19
import { BlockSelectionPlugin } from '@udecode/plate-selection/react' ;
20
20
21
+ import { useMounted } from '@/hooks/use-mounted' ;
21
22
import { Icons } from '@/components/icons' ;
22
23
23
24
import {
@@ -59,6 +60,7 @@ export const Draggable = withHOC(
59
60
const state = useDraggableState ( { element, onDropHandler } ) ;
60
61
const { isDragging } = state ;
61
62
const { previewRef, handleRef } = useDraggable ( state ) ;
63
+ const mounted = useMounted ( ) ;
62
64
63
65
return (
64
66
< div
@@ -81,7 +83,7 @@ export const Draggable = withHOC(
81
83
< div
82
84
ref = { handleRef }
83
85
className = "size-4"
84
- data-key = { element . id as string }
86
+ data-key = { mounted ? ( element . id as string ) : undefined }
85
87
>
86
88
< DragHandle />
87
89
</ div >
You can’t perform that action at this time.
0 commit comments