fix: error in tree table dragging and sorting (#2476)
This commit is contained in:
parent
9dc08277e1
commit
3fc3d34aa7
@ -304,10 +304,9 @@ export const Table: any = observer(
|
||||
}
|
||||
const fromIndex = e.active?.data.current?.sortable?.index;
|
||||
const toIndex = e.over?.data.current?.sortable?.index;
|
||||
const from = field.value[fromIndex];
|
||||
const to = field.value[toIndex];
|
||||
field.move(fromIndex, toIndex);
|
||||
onRowDragEnd({ fromIndex, toIndex, from, to });
|
||||
const from = field.value[fromIndex] || e.active;
|
||||
const to = field.value[toIndex] || e.over;
|
||||
onRowDragEnd({ from, to });
|
||||
}}
|
||||
>
|
||||
<tbody {...props} />
|
||||
|
Loading…
Reference in New Issue
Block a user