mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-10-14 04:56:38 +08:00
fix: correct SortableContext nesting for table drag-and-drop (#263)
## Summary - Fixed incorrect nesting of SortableContext component in forward table - Moved SortableContext wrapper to properly wrap the entire Table component instead of wrapping individual rows - This ensures drag-and-drop functionality works correctly with the table structure
This commit is contained in:
@@ -3788,6 +3788,10 @@ export default function ForwardPage() {
|
||||
collisionDetection={closestCenter}
|
||||
sensors={sensors}
|
||||
onDragEnd={handleDragEnd}
|
||||
>
|
||||
<SortableContext
|
||||
items={sortableForwardIds}
|
||||
strategy={verticalListSortingStrategy}
|
||||
>
|
||||
<Table
|
||||
aria-label="全部转发列表"
|
||||
@@ -3814,11 +3818,6 @@ export default function ForwardPage() {
|
||||
</TableHeader>
|
||||
<TableBody emptyContent="暂无转发配置" items={sortedForwards}>
|
||||
{(forward) => (
|
||||
<SortableContext
|
||||
key={forward.id}
|
||||
items={sortableForwardIds}
|
||||
strategy={verticalListSortingStrategy}
|
||||
>
|
||||
<SortableCompactTableRow
|
||||
formatFlow={formatFlow}
|
||||
formatInAddress={formatInAddress}
|
||||
@@ -3835,10 +3834,10 @@ export default function ForwardPage() {
|
||||
showAddressModal={showAddressModal}
|
||||
toggleSelect={toggleSelect}
|
||||
/>
|
||||
</SortableContext>
|
||||
)}
|
||||
</TableBody>
|
||||
</Table>
|
||||
</SortableContext>
|
||||
</DndContext>
|
||||
</div>
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user