rc-trigger
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -33,2 +33,4 @@ 'use strict'; | ||
var ALL_HANDLERS = ['onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur']; | ||
var Trigger = _react2['default'].createClass({ | ||
@@ -343,2 +345,14 @@ displayName: 'Trigger', | ||
ALL_HANDLERS.forEach(function (handler) { | ||
var newFn = undefined; | ||
if (props[handler] && newChildProps[handler]) { | ||
newFn = (0, _rcUtil.createChainedFunction)(props[handler], newChildProps[handler]); | ||
} else { | ||
newFn = props[handler] || newChildProps[handler]; | ||
} | ||
if (newFn) { | ||
newChildProps[handler] = newFn; | ||
} | ||
}); | ||
return _react2['default'].cloneElement(child, newChildProps); | ||
@@ -345,0 +359,0 @@ } |
@@ -6,11 +6,7 @@ 'use strict'; | ||
}); | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
exports.getAlignFromPlacement = getAlignFromPlacement; | ||
exports.getPopupClassNameFromAlign = getPopupClassNameFromAlign; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | ||
var _objectAssign = require('object-assign'); | ||
var _objectAssign2 = _interopRequireDefault(_objectAssign); | ||
function isPointsEq(a1, a2) { | ||
@@ -22,3 +18,3 @@ return a1[0] === a2[0] && a1[1] === a2[1]; | ||
var baseAlign = builtinPlacements[placementStr] || {}; | ||
return (0, _objectAssign2['default'])({}, baseAlign, align); | ||
return _extends({}, baseAlign, align); | ||
} | ||
@@ -25,0 +21,0 @@ |
{ | ||
"name": "rc-trigger", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "base abstract trigger component for react", | ||
@@ -58,5 +58,4 @@ "keywords": [ | ||
"rc-animate": "2.x", | ||
"rc-util": "3.x", | ||
"object-assign": "4.x" | ||
"rc-util": "3.x" | ||
} | ||
} |
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
28968
3
610
- Removedobject-assign@4.x