import React, { useContext, useMemo } from 'react'; import { HolderOutlined } from '@ant-design/icons'; import type { DragEndEvent } from '@dnd-kit/core'; import { DndContext } from '@dnd-kit/core'; import type { SyntheticListenerMap } from '@dnd-kit/core/dist/hooks/utilities'; import { restrictToVerticalAxis } from '@dnd-kit/modifiers'; import { arrayMove, SortableContext, useSortable, verticalListSortingStrategy, } from '@dnd-kit/sortable'; import { CSS } from '@dnd-kit/utilities'; import { Button, Table } from 'antd'; import type { TableColumnsType } from 'antd'; interface DataType { key: string; name: string; age: number; address: string; } interface RowContextProps { setActivatorNodeRef?: (element: HTMLElement | null) => void; listeners?: SyntheticListenerMap; } const RowContext = React.createContext({}); const DragHandle: React.FC = () => { const { setActivatorNodeRef, listeners } = useContext(RowContext); return (