mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-31 02:49:56 +02:00
Re-render leaf when new properties were added to it (#4347)
This commit is contained in:
committed by
GitHub
parent
e79f238c76
commit
46c8871c9c
5
.changeset/sixty-ties-fetch.md
Normal file
5
.changeset/sixty-ties-fetch.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'slate-react': patch
|
||||
---
|
||||
|
||||
Re-render leaf when new properties were added to it
|
@@ -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]
|
||||
)
|
||||
})
|
||||
|
Reference in New Issue
Block a user