From bff5eb79f0dd708397a120fb45c36c715917fa4d Mon Sep 17 00:00:00 2001 From: oomeow Date: Tue, 15 Sep 2026 21:22:26 +0800 Subject: [PATCH] refactor(list): remove feedbackClone from sortable item and list integration --- src/components/base/sortable-item.tsx | 6 ------ src/components/profile/grouped-virtual-list.tsx | 1 - 2 files changed, 7 deletions(-) diff --git a/src/components/base/sortable-item.tsx b/src/components/base/sortable-item.tsx index d5ebc8d4e..b19b2c962 100644 --- a/src/components/base/sortable-item.tsx +++ b/src/components/base/sortable-item.tsx @@ -1,4 +1,3 @@ -import { Feedback } from '@dnd-kit/dom' import { useSortable } from '@dnd-kit/react/sortable' import { useTheme } from '@mui/material' import { type CSSProperties, type ReactNode, useCallback } from 'react' @@ -17,7 +16,6 @@ interface SortableItemProps { // 用于给 tanstack virtual 列表测量当前拖动元素尺寸 measureElementRef?: (element: HTMLDivElement | null) => void dataIndex?: number - feedbackClone?: boolean style?: CSSProperties children: ReactNode | ((props: SortableItemRenderProps) => ReactNode) } @@ -30,7 +28,6 @@ export const SortableItem = (props: SortableItemProps) => { disabled, measureElementRef, dataIndex, - feedbackClone, children, style, } = props @@ -38,9 +35,6 @@ export const SortableItem = (props: SortableItemProps) => { id, index, group, - ...(feedbackClone && { - plugins: [Feedback.configure({ feedback: 'clone' })], - }), disabled, }) const theme = useTheme() diff --git a/src/components/profile/grouped-virtual-list.tsx b/src/components/profile/grouped-virtual-list.tsx index c33010787..44eb2a701 100644 --- a/src/components/profile/grouped-virtual-list.tsx +++ b/src/components/profile/grouped-virtual-list.tsx @@ -164,7 +164,6 @@ export function GroupedVirtualList(props: GroupedVirtualListProps) { id={entry.id} index={vi.index} disabled={entry.category === 'original'} - feedbackClone measureElementRef={virtualizer.measureElement} dataIndex={vi.index} style={{