rc-drawer
Advanced tools
Comparing version 5.0.0-alpha.2 to 5.0.0-alpha.3
@@ -15,4 +15,5 @@ import * as React from 'react'; | ||
onClose?: React.KeyboardEventHandler<HTMLElement>; | ||
containerRef?: React.Ref<HTMLDivElement>; | ||
} | ||
declare const DrawerPanel: React.ForwardRefExoticComponent<DrawerPanelProps & React.RefAttributes<DrawerPanelRef>>; | ||
export default DrawerPanel; |
@@ -5,2 +5,3 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; | ||
import KeyCode from "rc-util/es/KeyCode"; | ||
import { composeRef } from "rc-util/es/ref"; | ||
var sentinelStyle = { | ||
@@ -21,3 +22,4 @@ width: 0, | ||
children = props.children, | ||
onClose = props.onClose; // ================================ Refs ================================ | ||
onClose = props.onClose, | ||
containerRef = props.containerRef; // ================================ Refs ================================ | ||
@@ -92,3 +94,3 @@ var panelRef = React.useRef(); | ||
tabIndex: -1, | ||
ref: panelRef, | ||
ref: composeRef(panelRef, containerRef), | ||
onKeyDown: onPanelKeyDown | ||
@@ -95,0 +97,0 @@ }, /*#__PURE__*/React.createElement("div", { |
@@ -9,3 +9,2 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import DrawerPanel from './DrawerPanel'; | ||
import { composeRef } from "rc-util/es/ref"; | ||
import DrawerContext from './context'; | ||
@@ -185,3 +184,4 @@ export default function DrawerPopup(props) { | ||
return /*#__PURE__*/React.createElement(DrawerPanel, { | ||
ref: composeRef(motionRef, panelRef), | ||
ref: panelRef, | ||
containerRef: motionRef, | ||
prefixCls: prefixCls, | ||
@@ -188,0 +188,0 @@ className: classNames(className, motionClassName), |
@@ -15,4 +15,5 @@ import * as React from 'react'; | ||
onClose?: React.KeyboardEventHandler<HTMLElement>; | ||
containerRef?: React.Ref<HTMLDivElement>; | ||
} | ||
declare const DrawerPanel: React.ForwardRefExoticComponent<DrawerPanelProps & React.RefAttributes<DrawerPanelRef>>; | ||
export default DrawerPanel; |
@@ -20,2 +20,4 @@ "use strict"; | ||
var _ref = require("rc-util/lib/ref"); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -40,3 +42,4 @@ | ||
children = props.children, | ||
onClose = props.onClose; // ================================ Refs ================================ | ||
onClose = props.onClose, | ||
containerRef = props.containerRef; // ================================ Refs ================================ | ||
@@ -111,3 +114,3 @@ var panelRef = React.useRef(); | ||
tabIndex: -1, | ||
ref: panelRef, | ||
ref: (0, _ref.composeRef)(panelRef, containerRef), | ||
onKeyDown: onPanelKeyDown | ||
@@ -114,0 +117,0 @@ }, /*#__PURE__*/React.createElement("div", { |
@@ -28,4 +28,2 @@ "use strict"; | ||
var _ref4 = require("rc-util/lib/ref"); | ||
var _context = _interopRequireDefault(require("./context")); | ||
@@ -210,3 +208,4 @@ | ||
return /*#__PURE__*/React.createElement(_DrawerPanel.default, { | ||
ref: (0, _ref4.composeRef)(motionRef, panelRef), | ||
ref: panelRef, | ||
containerRef: motionRef, | ||
prefixCls: prefixCls, | ||
@@ -213,0 +212,0 @@ className: (0, _classnames.default)(className, motionClassName), |
{ | ||
"name": "rc-drawer", | ||
"version": "5.0.0-alpha.2", | ||
"version": "5.0.0-alpha.3", | ||
"description": "drawer component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
48332
935