react-dnd-scrolling
Advanced tools
Comparing version 1.3.5 to 1.3.6
@@ -86,9 +86,8 @@ "use strict"; | ||
} | ||
var containerElement = componentRef.current; | ||
(0, _react.useEffect)(function () { | ||
if (!containerElement) { | ||
if (!componentRef.current) { | ||
return function () {}; | ||
} | ||
var options = _objectSpread(_objectSpread({}, defaultOptions), passedOptions); | ||
var monitor = new _ScrollingMonitor["default"](dragDropManager, containerElement, options); | ||
var monitor = new _ScrollingMonitor["default"](dragDropManager, componentRef.current, options); | ||
monitor.start(); | ||
@@ -98,3 +97,4 @@ return function () { | ||
}; | ||
}, [containerElement, dragDropManager, passedOptions]); | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
}, [componentRef.current, dragDropManager, passedOptions]); | ||
} | ||
@@ -101,0 +101,0 @@ function createScrollingComponent(WrappedComponent) { |
@@ -66,9 +66,8 @@ var _excluded = ["strengthMultiplier", "verticalStrength", "horizontalStrength", "onScrollChange"]; | ||
} | ||
var containerElement = componentRef.current; | ||
useEffect(function () { | ||
if (!containerElement) { | ||
if (!componentRef.current) { | ||
return function () {}; | ||
} | ||
var options = _extends({}, defaultOptions, passedOptions); | ||
var monitor = new ScrollingMonitor(dragDropManager, containerElement, options); | ||
var monitor = new ScrollingMonitor(dragDropManager, componentRef.current, options); | ||
monitor.start(); | ||
@@ -78,3 +77,4 @@ return function () { | ||
}; | ||
}, [containerElement, dragDropManager, passedOptions]); | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
}, [componentRef.current, dragDropManager, passedOptions]); | ||
} | ||
@@ -81,0 +81,0 @@ export default function createScrollingComponent(WrappedComponent) { |
{ | ||
"name": "react-dnd-scrolling", | ||
"version": "1.3.5", | ||
"version": "1.3.6", | ||
"description": "A cross browser solution to scrolling during drag and drop.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42316