1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-20 22:21:20 +02:00

Fix onDragStart callback dependency on 'readonly' (#4707)

* fix: add 'readonly' dependency for onDragStart callback

* add changeset
This commit is contained in:
Alex
2021-12-04 17:08:48 +01:00
committed by GitHub
parent 6d19407776
commit c020ca23b6
2 changed files with 6 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
'slate-react': patch
---
fix: add 'readonly' dependency for onDragStart callback

View File

@@ -936,7 +936,7 @@ export const Editable = (props: EditableProps) => {
ReactEditor.setFragmentData(editor, event.dataTransfer)
}
},
[attributes.onDragStart]
[readOnly, attributes.onDragStart]
)}
onDrop={useCallback(
(event: React.DragEvent<HTMLDivElement>) => {