fix(richtext-lexical): add form id to drawSlug (#9613)
Fixes #9532 The error occurs because the drawerSlug declaration in `blocks/client/component` contains `formData.id`, while `blocks/client/componentInline` does not. So I add `formData.id`. ### Before https://github.com/user-attachments/assets/14247634-ab60-437f-8986-c76cafec5c09 ### After https://github.com/user-attachments/assets/b26bc1ca-b071-4bf5-a9f0-fda4e9282538
This commit is contained in:
@@ -97,7 +97,7 @@ export const InlineBlockComponent: React.FC<Props> = (props) => {
|
||||
)
|
||||
|
||||
const drawerSlug = formatDrawerSlug({
|
||||
slug: `lexical-inlineBlocks-create-` + uuidFromContext,
|
||||
slug: `lexical-inlineBlocks-create-${uuidFromContext}-${formData.id}`,
|
||||
depth: editDepth,
|
||||
})
|
||||
const { toggleDrawer } = useLexicalDrawer(drawerSlug, true)
|
||||
|
||||
Reference in New Issue
Block a user