Skip to content

Commit abb9b50

Browse files
authored
fix(dashboard): email editor showing empty state on first render fixes NV-6227 (#8664)
1 parent 6795dd8 commit abb9b50

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/dashboard/src/components/maily/maily.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ForwardRefExoticComponent, HTMLAttributes, useCallback, useMemo } from 'react';
1+
import { ForwardRefExoticComponent, HTMLAttributes, useCallback, useMemo, useRef } from 'react';
22
import { Editor as MailyEditor } from '@maily-to/core';
33
import type { Editor, NodeViewProps, Editor as TiptapEditor } from '@tiptap/core';
44
import { Editor as TiptapEditorReact } from '@tiptap/react';
@@ -198,6 +198,7 @@ export const Maily = ({
198198
{...rest}
199199
>
200200
<MailyEditor
201+
key={value ? 'has-content' : 'empty'}
201202
config={DEFAULT_EDITOR_CONFIG}
202203
blocks={blocks}
203204
extensions={extensions}

0 commit comments

Comments
 (0)