mirror of
https://github.com/zhigang1992/react-native-swipeout.git
synced 2026-01-12 17:42:54 +08:00
Merge pull request #292 from justinmakaila/fix/refs-update
Updated refs usage
This commit is contained in:
@@ -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,
|
||||
@@ -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({
|
||||
@@ -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({
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user