Commit 79e4d40 1 parent 7853d7f commit 79e4d40 Copy full SHA for 79e4d40
File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
import cls from 'classnames' ;
2
- import { useEvent } from 'rc-util' ;
2
+ import useEvent from 'rc-util/lib/hooks/useEvent ' ;
3
3
import useMergedState from 'rc-util/lib/hooks/useMergedState' ;
4
4
import isEqual from 'rc-util/lib/isEqual' ;
5
5
import warning from 'rc-util/lib/warning' ;
Original file line number Diff line number Diff line change 1
- import { useEvent } from 'rc-util' ;
2
1
import * as React from 'react' ;
2
+ import useEvent from 'rc-util/lib/hooks/useEvent' ;
3
+ import useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect' ;
3
4
import { UnstableContext } from '../context' ;
4
5
import type { Direction , OnStartMove } from '../interface' ;
5
6
import type { OffsetValues } from './useOffset' ;
@@ -44,7 +45,7 @@ function useDrag(
44
45
45
46
const { onDragStart, onDragChange } = React . useContext ( UnstableContext ) ;
46
47
47
- React . useLayoutEffect ( ( ) => {
48
+ useLayoutEffect ( ( ) => {
48
49
if ( draggingIndex === - 1 ) {
49
50
setCacheValues ( rawValues ) ;
50
51
}
You can’t perform that action at this time.
0 commit comments