Skip to content

Commit ec1afc3

Browse files
authored
fix(drag-handle-react): forward getReferencedVirtualElement to plugin (#7832)
* fix(drag-handle-react): forward getReferencedVirtualElement to plugin The React DragHandle component defined the prop but did not pass it to DragHandlePlugin, making the API ineffective. * chore: add changeset
1 parent b567914 commit ec1afc3

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

.changeset/wet-poets-knock.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@tiptap/extension-drag-handle-react': patch
3+
---
4+
5+
Fix missing forwarding of getReferencedVirtualElement in DragHandle React component

packages/extension-drag-handle-react/src/DragHandle.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export const DragHandle = (props: DragHandleProps) => {
7171
onNodeChange,
7272
onElementDragStart,
7373
onElementDragEnd,
74+
getReferencedVirtualElement,
7475
computePositionConfig = defaultComputePositionConfig,
7576
nested = false,
7677
} = props
@@ -116,6 +117,7 @@ export const DragHandle = (props: DragHandleProps) => {
116117
onElementDragStart,
117118
onElementDragEnd,
118119
onNodeChange,
120+
getReferencedVirtualElement,
119121
nestedOptions,
120122
})
121123

@@ -131,6 +133,7 @@ export const DragHandle = (props: DragHandleProps) => {
131133
element,
132134
editor,
133135
onNodeChange,
136+
getReferencedVirtualElement,
134137
pluginKey,
135138
computePositionConfig,
136139
onElementDragStart,

0 commit comments

Comments
 (0)