diff --git a/src/Step.js b/src/Step.js index 6c1a22b..f095302 100644 --- a/src/Step.js +++ b/src/Step.js @@ -14,10 +14,13 @@ class Step extends Component { getData = () => this.props.data; - updateOffsetHeight = () => + updateOffsetHeight = () =>{ + const offsetHeight = this.getDOMNode().offsetHeight; this.setState({ - offsetHeight: this.getDOMNode().offsetHeight, + offsetHeight, }); + return offsetHeight; + } enter = direction => this.setState({ state: 'enter', direction }); exit = direction => this.setState({ state: 'exit', direction });