Skip to content

Commit ef7f993

Browse files
authored
fix: fix race condition (#14)
1 parent 03376f8 commit ef7f993

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/components/src/array-table/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,9 @@ const InternalArrayTable: ReactFC<TableProps<any>> = observer(
372372
}}
373373
onSortEnd={(event) => {
374374
const { oldIndex, newIndex } = event
375-
field.move(oldIndex, newIndex)
375+
window.requestAnimationFrame(() => {
376+
field.move(oldIndex, newIndex)
377+
})
376378
}}
377379
className={cls(`${prefixCls}-sort-helper`, props.className)}
378380
>

0 commit comments

Comments
 (0)