mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-07-31 04:20:26 +02:00
Fix move_node caused full re-render. (#4120)
This commit is contained in:
@@ -78,7 +78,12 @@ export const withReact = <T extends Editor>(editor: T) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case 'move_node': {
|
case 'move_node': {
|
||||||
// TODO
|
for (const [node, path] of Editor.levels(e, {
|
||||||
|
at: Path.common(Path.parent(op.path), Path.parent(op.newPath)),
|
||||||
|
})) {
|
||||||
|
const key = ReactEditor.findKey(e, node)
|
||||||
|
matches.push([path, key])
|
||||||
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user