mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-04-20 13:22:04 +02:00
Fix move_node caused full re-render. (#4120)
This commit is contained in:
parent
bbd7d9c330
commit
b64fbd06d3
@ -78,7 +78,12 @@ export const withReact = <T extends Editor>(editor: T) => {
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user