react-dropdown
Advanced tools
Comparing version 1.8.0 to 1.9.0
@@ -10,4 +10,2 @@ "use strict"; | ||
var _reactDom = _interopRequireDefault(require("react-dom")); | ||
var _classnames = _interopRequireDefault(require("classnames")); | ||
@@ -61,2 +59,3 @@ | ||
}; | ||
_this.dropdownRef = (0, _react.createRef)(); | ||
_this.mounted = true; | ||
@@ -223,3 +222,3 @@ _this.handleDocumentClick = _this.handleDocumentClick.bind(_assertThisInitialized(_this)); | ||
if (this.mounted) { | ||
if (!_reactDom["default"].findDOMNode(this).contains(event.target)) { | ||
if (!this.dropdownRef.current.contains(event.target)) { | ||
if (this.state.isOpen) { | ||
@@ -269,2 +268,3 @@ this.setState({ | ||
return _react["default"].createElement("div", { | ||
ref: this.dropdownRef, | ||
className: dropdownClass | ||
@@ -271,0 +271,0 @@ }, _react["default"].createElement("div", { |
{ | ||
"name": "react-dropdown", | ||
"version": "1.8.0", | ||
"version": "1.9.0", | ||
"description": "React dropdown component", | ||
@@ -5,0 +5,0 @@ "main": "dist/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
22531
369