@lumx/react 4.0.1-alpha.1 → 4.0.1-alpha.2
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/index.js +4 -4
- package/index.js.map +1 -1
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -11642,10 +11642,10 @@ const useSlideScroll = ({
|
|
|
11642
11642
|
React__default.useEffect(() => {
|
|
11643
11643
|
const wrapper = wrapperRef.current;
|
|
11644
11644
|
if (!enabled || !wrapper) return undefined;
|
|
11645
|
+
const controller = new AbortController();
|
|
11645
11646
|
const {
|
|
11646
|
-
signal
|
|
11647
|
-
|
|
11648
|
-
} = new AbortController();
|
|
11647
|
+
signal
|
|
11648
|
+
} = controller;
|
|
11649
11649
|
const handleScroll = () => {
|
|
11650
11650
|
// Skip if currently scrolling programmatically
|
|
11651
11651
|
if (isAutoScrollRef.current) {
|
|
@@ -11669,7 +11669,7 @@ const useSlideScroll = ({
|
|
|
11669
11669
|
onScrollEnd(wrapper, reset, {
|
|
11670
11670
|
signal
|
|
11671
11671
|
});
|
|
11672
|
-
return () => abort();
|
|
11672
|
+
return () => controller.abort();
|
|
11673
11673
|
}, [enabled, onChange, wrapperRef]);
|
|
11674
11674
|
};
|
|
11675
11675
|
|