From feab2b218de91a90faaaedf52ae321722932d891 Mon Sep 17 00:00:00 2001 From: Palanikannan M Date: Tue, 11 Feb 2025 16:02:14 +0530 Subject: [PATCH] chore: renamed funcion name --- .../editor/src/core/extensions/mentions/extension-config.ts | 6 +++--- packages/editor/src/core/extensions/mentions/extension.tsx | 4 ++-- packages/editor/src/core/types/mention.ts | 2 +- web/core/components/pages/editor/editor-body.tsx | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/editor/src/core/extensions/mentions/extension-config.ts b/packages/editor/src/core/extensions/mentions/extension-config.ts index 77401f6d86..a8921648a0 100644 --- a/packages/editor/src/core/extensions/mentions/extension-config.ts +++ b/packages/editor/src/core/extensions/mentions/extension-config.ts @@ -9,7 +9,7 @@ import { EMentionComponentAttributeNames, TMentionComponentAttributes } from "./ export type TMentionExtensionOptions = MentionOptions & { renderComponent: TMentionHandler["renderComponent"]; - getMentionComponentAttributes: TMentionHandler["getMentionComponentAttributes"]; + getMentionedEntityDetails: TMentionHandler["getMentionedEntityDetails"]; }; export const CustomMentionExtensionConfig = Mention.extend({ @@ -63,6 +63,6 @@ export const CustomMentionExtensionConfig = Mention.extend { - const { searchCallback, renderComponent, getMentionComponentAttributes } = props; + const { searchCallback, renderComponent, getMentionedEntityDetails } = props; return CustomMentionExtensionConfig.extend({ addOptions(this) { return { ...this.parent?.(), renderComponent, - getMentionComponentAttributes, + getMentionedEntityDetails, }; }, diff --git a/packages/editor/src/core/types/mention.ts b/packages/editor/src/core/types/mention.ts index 7ce681d070..5d75cca906 100644 --- a/packages/editor/src/core/types/mention.ts +++ b/packages/editor/src/core/types/mention.ts @@ -20,7 +20,7 @@ export type TMentionComponentProps = Pick React.ReactNode; - getMentionComponentAttributes?: (entity_identifier: string) => IUserLite | undefined; + getMentionedEntityDetails?: (entity_identifier: string) => IUserLite | undefined; }; export type TMentionHandler = TReadOnlyMentionHandler & { diff --git a/web/core/components/pages/editor/editor-body.tsx b/web/core/components/pages/editor/editor-body.tsx index 7ad6c38ef8..aaac4389fc 100644 --- a/web/core/components/pages/editor/editor-body.tsx +++ b/web/core/components/pages/editor/editor-body.tsx @@ -190,7 +190,7 @@ export const PageEditorBody: React.FC = observer((props) => { return res; }, renderComponent: (props) => , - getMentionComponentAttributes: (id: string) => getUserDetails(id), + getMentionedEntityDetails: (id: string) => getUserDetails(id), }} embedHandler={{ issue: issueEmbedProps,