rc-trigger
Advanced tools
Comparing version 4.0.1 to 4.0.2
@@ -29,3 +29,3 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
import findDOMNode from "rc-util/es/Dom/findDOMNode"; | ||
import { composeRef } from "rc-util/es/ref"; | ||
import { composeRef, supportRef } from "rc-util/es/ref"; | ||
import addEventListener from "rc-util/es/Dom/addEventListener"; | ||
@@ -684,5 +684,9 @@ import Portal from "rc-util/es/Portal"; | ||
var trigger = React.cloneElement(child, _objectSpread({}, newChildProps, { | ||
ref: composeRef(this.triggerRef, child.ref) | ||
})); | ||
var cloneProps = _objectSpread({}, newChildProps); | ||
if (supportRef(child)) { | ||
cloneProps.ref = composeRef(this.triggerRef, child.ref); | ||
} | ||
var trigger = React.cloneElement(child, cloneProps); | ||
var portal; // prevent unmounting after it's rendered | ||
@@ -689,0 +693,0 @@ |
@@ -705,6 +705,10 @@ "use strict"; | ||
var trigger = _react.default.cloneElement(child, _objectSpread({}, newChildProps, { | ||
ref: (0, _ref2.composeRef)(this.triggerRef, child.ref) | ||
})); | ||
var cloneProps = _objectSpread({}, newChildProps); | ||
if ((0, _ref2.supportRef)(child)) { | ||
cloneProps.ref = (0, _ref2.composeRef)(this.triggerRef, child.ref); | ||
} | ||
var trigger = _react.default.cloneElement(child, cloneProps); | ||
var portal; // prevent unmounting after it's rendered | ||
@@ -711,0 +715,0 @@ |
{ | ||
"name": "rc-trigger", | ||
"version": "4.0.1", | ||
"version": "4.0.2", | ||
"description": "base abstract trigger component for react", | ||
@@ -47,6 +47,6 @@ "engines": { | ||
"devDependencies": { | ||
"@types/jest": "^24.0.18", | ||
"@types/jest": "^25.1.3", | ||
"@types/react": "^16.8.19", | ||
"@types/react-dom": "^16.8.4", | ||
"cross-env": "^6.0.0", | ||
"cross-env": "^7.0.1", | ||
"enzyme": "^3.3.0", | ||
@@ -56,3 +56,3 @@ "enzyme-adapter-react-16": "^1.14.0", | ||
"father": "^2.13.2", | ||
"np": "^5.0.3", | ||
"np": "^6.2.0", | ||
"react": "^16.0.0", | ||
@@ -68,4 +68,4 @@ "react-dom": "^16.0.0", | ||
"rc-animate": "^2.10.2", | ||
"rc-util": "^4.15.2" | ||
"rc-util": "^4.20.0" | ||
} | ||
} |
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
133742
2706
Updatedrc-util@^4.20.0