react-onclickoutside
Advanced tools
Comparing version 6.2.0 to 6.3.0
'use strict'; | ||
exports.__esModule = true; | ||
exports.IGNORE_CLASS_NAME = undefined; | ||
exports.default = onClickOutsideHOC; | ||
@@ -29,5 +28,2 @@ | ||
var touchEvents = ['touchstart', 'touchmove']; | ||
var IGNORE_CLASS_NAME = exports.IGNORE_CLASS_NAME = 'ignore-react-onclickoutside'; | ||
/** | ||
@@ -62,8 +58,4 @@ * This function generates the HOC function that you'll use | ||
} | ||
events.forEach(function (eventName) { | ||
var handlerOptions = null; | ||
if (!_this.props.preventDefault && touchEvents.indexOf(eventName) !== -1) { | ||
handlerOptions = { passive: true }; | ||
} | ||
var handlerOptions = !_this.props.preventDefault && ['touchstart', 'touchmove'].indexOf(eventName) !== -1 ? { passive: true } : null; | ||
document.addEventListener(eventName, fn, handlerOptions); | ||
@@ -247,3 +239,3 @@ }); | ||
excludeScrollbar: config && config.excludeScrollbar || false, | ||
outsideClickIgnoreClass: IGNORE_CLASS_NAME, | ||
outsideClickIgnoreClass: 'ignore-react-onclickoutside', | ||
preventDefault: false, | ||
@@ -250,0 +242,0 @@ stopPropagation: false |
{ | ||
"name": "react-onclickoutside", | ||
"version": "6.2.0", | ||
"version": "6.3.0", | ||
"description": "An onClickOutside wrapper for React components", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
26677
261