1
0
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:
Ulion
2021-04-01 06:25:09 +08:00
committed by GitHub
parent bbd7d9c330
commit b64fbd06d3

View File

@@ -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
} }
} }