8000 feat: remove string ref · jquense/react-bootstrap-modal@0576a6e · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Nov 7, 2019. It is now read-only.

Commit 0576a6e

Browse files
plagjquense
authored andcommitted
feat: remove string ref
1 parent 76f782c commit 0576a6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Modal.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ class Modal extends React.Component {
167167
>
168168
<div
169169
key='modal'
170-
ref='inner'
170+
ref={r => this.innerRef = r }
171171
className={cn(
172172
prefix + '-dialog'
173173
, dialogClassName
@@ -219,7 +219,7 @@ class Modal extends React.Component {
219219
this.setState({ classes: '' }, ()=> {
220220
if (this.props.show) {
221221
// eslint-disable-next-line no-unused-expressions
222-
this.refs.inner.offsetWidth
222+
this.innerRef.offsetWidth
223223
this.setState({
224224
classes: attentionClass + ' animated',
225225
})

0 commit comments

Comments
 (0)
0