From 38a5cbc930ba70c78f71f60abd8e206f14984f83 Mon Sep 17 00:00:00 2001 From: tanjianyong Date: Wed, 6 Dec 2023 21:32:25 +0800 Subject: [PATCH] fix(table): DragSortTable --- Reorder columns by dragging and dropping columns will have issues when the table has fixed columns first (#7936) fix #7631 --- packages/table/src/components/ColumnSetting/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/table/src/components/ColumnSetting/index.tsx b/packages/table/src/components/ColumnSetting/index.tsx index cdca9edb9d0f..4f918f70dbb6 100644 --- a/packages/table/src/components/ColumnSetting/index.tsx +++ b/packages/table/src/components/ColumnSetting/index.tsx @@ -189,7 +189,7 @@ const CheckboxList: React.FC<{ const targetIndex = newColumns.findIndex( (columnKey) => columnKey === targetId, ); - const isDownWard = dropPosition > findIndex; + const isDownWard = dropPosition >= findIndex; if (findIndex < 0) return; const targetItem = newColumns[findIndex]; newColumns.splice(findIndex, 1);