fix: once block type changed, the TextBlock node should be re-render (#551)

This commit is contained in:
zuomeng wang 2022-12-12 12:30:06 +00:00 committed by GitHub
parent 14f50cd821
commit b59b010dec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -266,6 +266,8 @@ export const TextView = ({
> >
<BlockPendantProvider editor={editor} block={block}> <BlockPendantProvider editor={editor} block={block}>
<TextBlock <TextBlock
// Once the block type changed, this node should be re-render
key={`${block.id}_${block.type}`}
block={block} block={block}
type={block.type} type={block.type}
editor={editor} editor={editor}