Socket
Socket
Sign inDemoInstall

react-modal-dialog

Package Overview
Dependencies
37
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.1 to 4.0.2

17

lib/ModalPortal.js

@@ -45,2 +45,7 @@ 'use strict';

_this._component = renderSubtreeIntoContainer(_this, _this.props.children, _this._target);
// A handler call in case you want to do something when a modal opens, like add a class to the body or something
if (typeof _this.props.onModalDidMount === 'function') {
_this.props.onModalDidMount();
}
};

@@ -64,2 +69,8 @@

var done = function done() {
// Modal will unmount now
// Call a handler, like onModalDidMount
if (typeof _this.props.onModalWillUnmount === 'function') {
_this.props.onModalWillUnmount();
}
// Remove the node and clean up after the target

@@ -92,4 +103,5 @@ _reactDom2['default'].unmountComponentAtNode(_this._target);

onClose: _react.PropTypes.func, // This is called when the dialog should close
children: _react.PropTypes.node
},
children: _react.PropTypes.node,
onModalDidMount: _react.PropTypes.func, // optional, called on mount
onModalWillUnmount: _react.PropTypes.func },
enumerable: true

@@ -103,4 +115,5 @@ }]);

module.exports = exports['default'];
// optional, called on unmount
// HTMLElement, a div that is appended to the body
// ReactComponent, which is mounted on the target
// This doesn't actually return anything to render

2

package.json
{
"name": "react-modal-dialog",
"version": "4.0.1",
"version": "4.0.2",
"description": "A simple, idiomatic, and declarative way to launch modal dialogs in ReactJS",

@@ -5,0 +5,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc