Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix: workaround circular dependency editor element

lawvs0d89fa10261a
diff --git a/libs/components/editor-blocks/src/blocks/group/scene-kanban/RefPage.tsx b/libs/components/editor-blocks/src/blocks/group/scene-kanban/RefPage.tsx
index b3353001b0..3d223d121d 100644
--- a/libs/components/editor-blocks/src/blocks/group/scene-kanban/RefPage.tsx
+++ b/libs/components/editor-blocks/src/blocks/group/scene-kanban/RefPage.tsx
@@ -1,4 +1,3 @@
-import { AffineEditor } from '@toeverything/components/affine-editor';
import { useEditor } from '@toeverything/components/editor-core';
import { MuiBackdrop, styled, useTheme } from '@toeverything/components/ui';
import { createContext, ReactNode, useContext, useState } from 'react';
@@ -44,7 +43,9 @@ const Modal = ({ open, children }: { open: boolean; children?: ReactNode }) => {
};
const ModalPage = ({ blockId }: { blockId: string | null }) => {
- const { editor } = useEditor();
+ const { editor, editorElement } = useEditor();
+
+ const AffineEditor = editorElement as any;
return (
<Modal open={!!blockId}>
@@ -53,6 +54,7 @@ const ModalPage = ({ blockId }: { blockId: string | null }) => {
workspace={editor.workspace}
rootBlockId={blockId}
scrollBlank={false}
+ // use edgeless mode prevent padding and blank bottom
isEdgeless
/>
)}