Skip to content
This repository has been archived by the owner on Sep 16, 2020. It is now read-only.

Commit

Permalink
Merge pull request #292 from justinmakaila/fix/refs-update
Browse files Browse the repository at this point in the history
Updated refs usage
  • Loading branch information
ryanoboril authored Sep 25, 2018
2 parents 1dbcdbd + 1eb3de4 commit 502e2bb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ const Swipeout = createReactClass({
} else {
this._callOnClose();
}
this.refs.swipeoutContent.measure((ox, oy, width, height) => {
this.swipeoutContent.measure((ox, oy, width, height) => {
let buttonWidth = this.props.buttonWidth || (width / 5);
this.setState({
btnWidth: buttonWidth,
Expand Down Expand Up @@ -302,7 +302,7 @@ const Swipeout = createReactClass({
},

_openRight: function () {
this.refs.swipeoutContent.measure((ox, oy, width, height) => {
this.swipeoutContent.measure((ox, oy, width, height) => {
let btnWidth = this.props.buttonWidth || (width / 5);

this.setState({
Expand All @@ -322,7 +322,7 @@ const Swipeout = createReactClass({
},

_openLeft: function () {
this.refs.swipeoutContent.measure((ox, oy, width, height) => {
this.swipeoutContent.measure((ox, oy, width, height) => {
let btnWidth = this.props.buttonWidth || (width / 5);

this.setState({
Expand Down Expand Up @@ -387,7 +387,7 @@ const Swipeout = createReactClass({
return (
<View style={styleSwipeout}>
<View
ref="swipeoutContent"
ref={node => this.swipeoutContent = node}
style={styleContent}
onLayout={this._onLayout}
{...this._panResponder.panHandlers}
Expand Down

0 comments on commit 502e2bb

Please sign in to comment.