fix: update MentionNode fallback to improve rendering

- Changed the fallback in MentionNode from displaying the mention name to null, enhancing the rendering behavior during loading states.

This update improves the user experience by ensuring a cleaner interface while mentions are being processed.

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei 2025-08-05 22:00:57 +08:00
parent 8107caef2c
commit a91078af08
No known key found for this signature in database
GPG Key ID: 0F62D33977F021F7
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ export class MentionNode extends DecoratorNode<React.JSX.Element> {
override decorate(_editor: LexicalEditor): React.JSX.Element {
return (
<React.Suspense fallback={<span>@{this.__mentionData.name}</span>}>
<React.Suspense fallback={null}>
<MentionComponent mentionData={this.__mentionData} />
</React.Suspense>
)