diff --git a/apps/web/src/components/ui/report/elements/BlockDraggable.tsx b/apps/web/src/components/ui/report/elements/BlockDraggable.tsx index 1587b8fb1..de19c0551 100644 --- a/apps/web/src/components/ui/report/elements/BlockDraggable.tsx +++ b/apps/web/src/components/ui/report/elements/BlockDraggable.tsx @@ -6,7 +6,7 @@ import { DndPlugin, useDraggable, useDropLine } from '@platejs/dnd'; import { expandListItemsWithChildren } from '@platejs/list'; import { BlockSelectionPlugin } from '@platejs/selection/react'; import { GripDots, Plus } from '@/components/ui/icons'; -import { type TElement, getPluginByType, isType, KEYS } from 'platejs'; +import { type Path, type TElement, getPluginByType, isType, KEYS } from 'platejs'; import { type PlateEditor, type PlateElementProps, @@ -22,6 +22,8 @@ import { useSelected } from 'platejs/react'; import { Button } from '@/components/ui/buttons'; import { Tooltip } from '@/components/ui/tooltip'; import { cn } from '@/lib/utils'; +import { useMemoizedFn } from '@/hooks/useMemoizedFn'; +import { insertBlock } from './transforms'; const UNDRAGGABLE_KEYS = [KEYS.column, KEYS.tr, KEYS.td]; @@ -135,7 +137,12 @@ function Draggable(props: PlateElementProps) { 'mr-1 flex items-center' )}>
- +