1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-30 18:39:51 +02:00

Re-render leaf when new properties were added to it (#4347)

This commit is contained in:
Krzysztof Mędrzycki
2021-07-09 17:52:06 +02:00
committed by GitHub
parent e79f238c76
commit 46c8871c9c
2 changed files with 6 additions and 1 deletions

View File

@@ -105,7 +105,7 @@ const MemoizedLeaf = React.memo(Leaf, (prev, next) => {
next.renderPlaceholder === prev.renderPlaceholder &&
next.text === prev.text &&
next.leaf.text === prev.leaf.text &&
Text.matches(next.leaf, prev.leaf) &&
Text.equals(next.leaf, prev.leaf) &&
next.leaf[PLACEHOLDER_SYMBOL] === prev.leaf[PLACEHOLDER_SYMBOL]
)
})