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

Commit

Permalink
fix(Modal): fix warning about ref
Browse files Browse the repository at this point in the history
  • Loading branch information
gregberge committed Sep 8, 2018
1 parent 1e84292 commit 563354c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,15 @@ class ModalComponent extends React.Component {
}

render() {
const { className, theme, opened, onClose, children, ...props } = this.props
const {
className,
baseRef,
theme,
opened,
onClose,
children,
...props
} = this.props
if (!this.container) return null
return createPortal(
<Transition
Expand All @@ -66,6 +74,7 @@ class ModalComponent extends React.Component {
},
className,
)}
ref={baseRef}
{...props}
>
<div className="sui-modal-backdrop" onClick={onClose} />
Expand Down

0 comments on commit 563354c

Please sign in to comment.