Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-dropdown

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-dropdown - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

8

dist/index.js

@@ -26,2 +26,3 @@ "use strict";

};
this.mounted = true;
}

@@ -46,2 +47,3 @@

value: function componentWillUnmount() {
this.mounted = false;
document.removeEventListener("click", this.handleDocumentClick.bind(this), false);

@@ -129,4 +131,6 @@ }

value: function handleDocumentClick(event) {
if (!React.findDOMNode(this).contains(event.target)) {
this.setState({ isOpen: false });
if (this.mounted) {
if (!React.findDOMNode(this).contains(event.target)) {
this.setState({ isOpen: false });
}
}

@@ -133,0 +137,0 @@ }

@@ -16,2 +16,3 @@ 'use strict';

}
this.mounted = true;
}

@@ -30,2 +31,3 @@

componentWillUnmount() {
this.mounted = false;
document.removeEventListener("click", this.handleDocumentClick.bind(this), false);

@@ -90,4 +92,6 @@ }

handleDocumentClick(event) {
if (!React.findDOMNode(this).contains(event.target)) {
this.setState({isOpen:false});
if(this.mounted) {
if (!React.findDOMNode(this).contains(event.target)) {
this.setState({isOpen:false});
}
}

@@ -94,0 +98,0 @@ }

{
"name": "react-dropdown",
"version": "0.4.0",
"version": "0.4.1",
"description": "React dropdown component",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc