rc-dropdown
Advanced tools
Comparing version 4.2.0 to 4.2.1
@@ -8,3 +8,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import classNames from 'classnames'; | ||
import { composeRef, supportRef } from "rc-util/es/ref"; | ||
import { composeRef, getNodeRef, supportRef } from "rc-util/es/ref"; | ||
import React from 'react'; | ||
@@ -100,3 +100,3 @@ import useAccessibility from "./hooks/useAccessibility"; | ||
className: classNames((_children$props = children.props) === null || _children$props === void 0 ? void 0 : _children$props.className, mergedVisible && getOpenClassName()), | ||
ref: supportRef(children) ? composeRef(childRef, children.ref) : undefined | ||
ref: supportRef(children) ? composeRef(childRef, getNodeRef(children)) : undefined | ||
}); | ||
@@ -103,0 +103,0 @@ var triggerHideAction = hideAction; |
@@ -0,2 +1,5 @@ | ||
export type { TriggerProps } from '@rc-component/trigger'; | ||
export type { DropdownProps } from './Dropdown'; | ||
export type { OverlayProps } from './Overlay'; | ||
import Dropdown from './Dropdown'; | ||
export default Dropdown; |
@@ -0,3 +1,3 @@ | ||
import { composeRef, getNodeRef, supportRef } from "rc-util/es/ref"; | ||
import React, { forwardRef, useMemo } from 'react'; | ||
import { composeRef, supportRef } from "rc-util/es/ref"; | ||
var Overlay = /*#__PURE__*/forwardRef(function (props, ref) { | ||
@@ -16,3 +16,3 @@ var overlay = props.overlay, | ||
}, [overlay]); | ||
var composedRef = composeRef(ref, overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.ref); | ||
var composedRef = composeRef(ref, getNodeRef(overlayNode)); | ||
return /*#__PURE__*/React.createElement(React.Fragment, null, arrow && /*#__PURE__*/React.createElement("div", { | ||
@@ -19,0 +19,0 @@ className: "".concat(prefixCls, "-arrow") |
@@ -106,3 +106,3 @@ "use strict"; | ||
className: (0, _classnames.default)((_children$props = children.props) === null || _children$props === void 0 ? void 0 : _children$props.className, mergedVisible && getOpenClassName()), | ||
ref: (0, _ref.supportRef)(children) ? (0, _ref.composeRef)(childRef, children.ref) : undefined | ||
ref: (0, _ref.supportRef)(children) ? (0, _ref.composeRef)(childRef, (0, _ref.getNodeRef)(children)) : undefined | ||
}); | ||
@@ -109,0 +109,0 @@ var triggerHideAction = hideAction; |
@@ -0,2 +1,5 @@ | ||
export type { TriggerProps } from '@rc-component/trigger'; | ||
export type { DropdownProps } from './Dropdown'; | ||
export type { OverlayProps } from './Overlay'; | ||
import Dropdown from './Dropdown'; | ||
export default Dropdown; |
@@ -8,4 +8,4 @@ "use strict"; | ||
exports.default = void 0; | ||
var _ref = require("rc-util/lib/ref"); | ||
var _react = _interopRequireWildcard(require("react")); | ||
var _ref = require("rc-util/lib/ref"); | ||
var Overlay = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) { | ||
@@ -24,3 +24,3 @@ var overlay = props.overlay, | ||
}, [overlay]); | ||
var composedRef = (0, _ref.composeRef)(ref, overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.ref); | ||
var composedRef = (0, _ref.composeRef)(ref, (0, _ref.getNodeRef)(overlayNode)); | ||
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, arrow && /*#__PURE__*/_react.default.createElement("div", { | ||
@@ -27,0 +27,0 @@ className: "".concat(prefixCls, "-arrow") |
{ | ||
"name": "rc-dropdown", | ||
"version": "4.2.0", | ||
"version": "4.2.1", | ||
"description": "dropdown ui component for react", | ||
@@ -36,3 +36,3 @@ "keywords": [ | ||
"prepare": "husky install && dumi setup", | ||
"prepublishOnly": "npm run compile && np --no-cleanup --yolo --no-publish", | ||
"prepublishOnly": "npm run compile", | ||
"start": "dumi dev", | ||
@@ -51,3 +51,3 @@ "test": "rc-test" | ||
"classnames": "^2.2.6", | ||
"rc-util": "^5.17.0" | ||
"rc-util": "^5.44.1" | ||
}, | ||
@@ -54,0 +54,0 @@ "devDependencies": { |
43056
998
Updatedrc-util@^5.44.1