Skip to content
This repository was archived by the owner on Jun 20, 2022. It is now read-only.

Commit 563354c

Browse files
committed
fix(Modal): fix warning about ref
1 parent 1e84292 commit 563354c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/Modal.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,15 @@ class ModalComponent extends React.Component {
4747
}
4848

4949
render() {
50-
const { className, theme, opened, onClose, children, ...props } = this.props
50+
const {
51+
className,
52+
baseRef,
53+
theme,
54+
opened,
55+
onClose,
56+
children,
57+
...props
58+
} = this.props
5159
if (!this.container) return null
5260
return createPortal(
5361
<Transition
@@ -66,6 +74,7 @@ class ModalComponent extends React.Component {
6674
},
6775
className,
6876
)}
77+
ref={baseRef}
6978
{...props}
7079
>
7180
<div className="sui-modal-backdrop" onClick={onClose} />

0 commit comments

Comments
 (0)