pull out getRef

main
Mike Fix 6 years ago
parent 4321c3455f
commit 7c567412dc

@ -52,6 +52,11 @@ class Carbon extends React.PureComponent {
} }
} }
getRef = ele => {
this.exportContainerNode = ele
this.props.innerRef(ele)
}
render() { render() {
const config = { ...DEFAULT_SETTINGS, ...this.props.config } const config = { ...DEFAULT_SETTINGS, ...this.props.config }
@ -218,13 +223,7 @@ class Carbon extends React.PureComponent {
return ( return (
<div className="section"> <div className="section">
<div <div className="export-container" ref={this.getRef}>
className="export-container"
ref={ele => {
this.exportContainerNode = ele
this.props.innerRef(ele)
}}
>
{content} {content}
<div className="twitter-png-fix" /> <div className="twitter-png-fix" />
</div> </div>

Loading…
Cancel
Save