From 4a30d8bd3c14469b0253edfdad29ff904fa857c8 Mon Sep 17 00:00:00 2001 From: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com> Date: Fri, 13 Jun 2025 21:54:03 +0530 Subject: [PATCH] fix(ui): hashlist render for block editor (#21763) --- .../BlockEditor/Extensions/hashtag/hashtagSuggestion.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/BlockEditor/Extensions/hashtag/hashtagSuggestion.ts b/openmetadata-ui/src/main/resources/ui/src/components/BlockEditor/Extensions/hashtag/hashtagSuggestion.ts index d568413dd87..c96e44aa5d4 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/BlockEditor/Extensions/hashtag/hashtagSuggestion.ts +++ b/openmetadata-ui/src/main/resources/ui/src/components/BlockEditor/Extensions/hashtag/hashtagSuggestion.ts @@ -60,6 +60,11 @@ export const hashtagSuggestion = () => ({ return { onStart: (props: SuggestionProps) => { + // Check if editor is in preview mode + if (props.editor.isEditable === false) { + return; + } + component = new ReactRenderer(HashList, { props, editor: props.editor, @@ -74,7 +79,7 @@ export const hashtagSuggestion = () => ({ props.clientRect as Props['getReferenceClientRect'], appendTo: () => document.body, content: component.element, - showOnCreate: false, + showOnCreate: true, interactive: true, trigger: 'manual', placement: 'bottom-start',