From 7c51ad810df70d31e50e2d545b4d09f9194ff99d Mon Sep 17 00:00:00 2001 From: Beeant Date: Tue, 5 Nov 2024 14:30:16 +0000 Subject: [PATCH] fix: optional key --- packages/mention/src/lib/BaseMentionPlugin.ts | 2 +- packages/mention/src/lib/types.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/mention/src/lib/BaseMentionPlugin.ts b/packages/mention/src/lib/BaseMentionPlugin.ts index fd8d3e30a2..494f10832e 100644 --- a/packages/mention/src/lib/BaseMentionPlugin.ts +++ b/packages/mention/src/lib/BaseMentionPlugin.ts @@ -18,7 +18,7 @@ export type MentionConfig = PluginConfig< {}, { insert: { - mention: (options: { key: any; search: string; value: any; }) => void; + mention: (options: { key?: any; search: string; value: any; }) => void; }; } >; diff --git a/packages/mention/src/lib/types.ts b/packages/mention/src/lib/types.ts index c16b7c4963..28c93100d4 100644 --- a/packages/mention/src/lib/types.ts +++ b/packages/mention/src/lib/types.ts @@ -1,7 +1,7 @@ import type { TElement } from '@udecode/plate-common'; export interface TMentionItemBase { - key: any; + key?: any; text: string; }