@react-aria/dnd 3.2.1-nightly.3871 → 3.2.1-nightly.3877

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/import.mjs CHANGED
@@ -2867,6 +2867,17 @@ function $80d9daea3067eff3$export$6323452ca4533ed8(ref) {
2867
2867
  dx: 0,
2868
2868
  dy: 0
2869
2869
  }).current;
2870
+ (0, $fP8tg$useEffect)(()=>{
2871
+ return ()=>{
2872
+ if (state.timer) {
2873
+ cancelAnimationFrame(state.timer);
2874
+ state.timer = null;
2875
+ }
2876
+ };
2877
+ // state will become a new object, so it's ok to use in the dependency array for unmount
2878
+ }, [
2879
+ state
2880
+ ]);
2870
2881
  let scroll = (0, $fP8tg$useCallback)(()=>{
2871
2882
  scrollableRef.current.scrollLeft += state.dx;
2872
2883
  scrollableRef.current.scrollTop += state.dy;
package/dist/main.js CHANGED
@@ -2886,6 +2886,17 @@ function $12cc069a1c69155b$export$6323452ca4533ed8(ref) {
2886
2886
  dx: 0,
2887
2887
  dy: 0
2888
2888
  }).current;
2889
+ (0, $4vY0V$react.useEffect)(()=>{
2890
+ return ()=>{
2891
+ if (state.timer) {
2892
+ cancelAnimationFrame(state.timer);
2893
+ state.timer = null;
2894
+ }
2895
+ };
2896
+ // state will become a new object, so it's ok to use in the dependency array for unmount
2897
+ }, [
2898
+ state
2899
+ ]);
2889
2900
  let scroll = (0, $4vY0V$react.useCallback)(()=>{
2890
2901
  scrollableRef.current.scrollLeft += state.dx;
2891
2902
  scrollableRef.current.scrollTop += state.dy;