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

rc-trigger

Package Overview
Dependencies
Maintainers
1
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-trigger - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

33

lib/Popup.js

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

onMouseEnter: _react.PropTypes.func,
onAnimateLeave: _react.PropTypes.func,
className: _react.PropTypes.string,

@@ -58,6 +57,2 @@ onMouseLeave: _react.PropTypes.func

onAnimateLeave: function onAnimateLeave() {
this.props.onAnimateLeave();
},
getPopupDomNode: function getPopupDomNode() {

@@ -95,2 +90,3 @@ return _reactDom2['default'].findDOMNode(this);

var prefixCls = props.prefixCls;
var destroyPopupOnHide = props.destroyPopupOnHide;

@@ -102,2 +98,28 @@ var className = this.getClassName(this.currentAlignClassName || props.getClassNameFromAlign(align));

}
if (destroyPopupOnHide) {
return _react2['default'].createElement(
_rcAnimate2['default'],
{ component: '',
exclusive: true,
transitionAppear: true,
transitionName: this.getTransitionName() },
visible ? _react2['default'].createElement(
_rcAlign2['default'],
{ target: this.getTarget,
key: 'popup',
monitorWindowResize: true,
align: align,
onAlign: this.onAlign },
_react2['default'].createElement(
_PopupInner2['default'],
{ className: className,
visible: true,
onMouseEnter: props.onMouseEnter,
onMouseLeave: props.onMouseLeave,
style: style },
props.children
)
) : null
);
}
return _react2['default'].createElement(

@@ -108,3 +130,2 @@ _rcAnimate2['default'],

transitionAppear: true,
onLeave: this.onAnimateLeave,
transitionName: this.getTransitionName(),

@@ -111,0 +132,0 @@ showProp: 'xVisible' },

9

lib/Trigger.js

@@ -210,9 +210,2 @@ 'use strict';

onAnimateLeave: function onAnimateLeave() {
if (this.props.destroyPopupOnHide) {
_reactDom2['default'].unmountComponentAtNode(this.getPopupContainer());
this.popupDomNode = null;
}
},
onDocumentClick: function onDocumentClick(event) {

@@ -284,2 +277,3 @@ var target = event.target;

_extends({ prefixCls: props.prefixCls,
destroyPopupOnHide: props.destroyPopupOnHide,
visible: state.popupVisible,

@@ -290,3 +284,2 @@ className: props.popupClassName,

animation: props.popupAnimation,
onAnimateLeave: this.onAnimateLeave,
getClassNameFromAlign: this.getPopupClassNameFromAlign

@@ -293,0 +286,0 @@ }, mouseProps, {

{
"name": "rc-trigger",
"version": "1.0.5",
"version": "1.0.6",
"description": "base abstract trigger component for react",

@@ -5,0 +5,0 @@ "keywords": [

@@ -70,3 +70,3 @@ # rc-trigger

<a href='#'>hover</a>
</Tooltip>, container);
</Trigger>, container);
```

@@ -73,0 +73,0 @@

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