diff --git a/libs/components/editor-blocks/src/utils/WithTreeViewChildren.tsx b/libs/components/editor-blocks/src/utils/WithTreeViewChildren.tsx index f4fdd29240..e7e497f2ef 100644 --- a/libs/components/editor-blocks/src/utils/WithTreeViewChildren.tsx +++ b/libs/components/editor-blocks/src/utils/WithTreeViewChildren.tsx @@ -1,9 +1,9 @@ import { + BlockPendantProvider, CreateView, RenderBlock, useCurrentView, useOnSelect, - BlockPendantProvider, } from '@toeverything/components/editor-core'; import { styled } from '@toeverything/components/ui'; import type { @@ -60,8 +60,8 @@ const ChildrenView = ({ {childrenIds.map((childId, idx) => { if (isKanbanScene) { return ( - - + + ); } diff --git a/libs/components/editor-core/src/render-block/RenderBlock.tsx b/libs/components/editor-core/src/render-block/RenderBlock.tsx index a7ebc1e2e1..0627aba95b 100644 --- a/libs/components/editor-core/src/render-block/RenderBlock.tsx +++ b/libs/components/editor-core/src/render-block/RenderBlock.tsx @@ -25,11 +25,11 @@ export function RenderBlock({ [block] ); - const blockView = useMemo(() => { + const BlockView = useMemo(() => { if (block?.type) { - return editor.getView(block.type); + return editor.getView(block.type).View; } - return null; + return () => null; }, [editor, block?.type]); if (!block) { @@ -44,22 +44,22 @@ export function RenderBlock({ columns: block.columns ?? [], }; - const view = blockView?.View ? ( - - ) : null; + ); return hasContainer ? ( {view} ) : ( - <> {view} + view ); } diff --git a/libs/components/ui/src/popper/Popper.tsx b/libs/components/ui/src/popper/Popper.tsx index 0a6e00747c..924e3be8fd 100644 --- a/libs/components/ui/src/popper/Popper.tsx +++ b/libs/components/ui/src/popper/Popper.tsx @@ -171,7 +171,9 @@ const Container = styled('div')({ display: 'contents', }); -const BasicStyledPopper = styled(PopperUnstyled)<{ +const BasicStyledPopper = styled(PopperUnstyled, { + shouldForwardProp: propName => !['zIndex'].some(name => name === propName), +})<{ zIndex?: number; }>(({ zIndex, theme }) => { return {