Skip to content

Commit

Permalink
RN: Add close to SwipeableRow
Browse files Browse the repository at this point in the history
Reviewed By: sahrens

Differential Revision: D5365597

fbshipit-source-id: 18cc896b551ce11b64c85067d5f17b3614762814
  • Loading branch information
yungsters authored and facebook-github-bot committed Jul 4, 2017
1 parent 6312d67 commit c28595e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Libraries/Experimental/SwipeableRow/SwipeableRow.js
Expand Up @@ -190,6 +190,11 @@ const SwipeableRow = React.createClass({
);
},

close(): void {
this.props.onClose();
this._animateToClosedPosition();
},

_onSwipeableViewLayout(event: Object): void {
this.setState({
isSwipeableViewRendered: true,
Expand Down Expand Up @@ -268,6 +273,7 @@ const SwipeableRow = React.createClass({
{
duration,
toValue,
useNativeDriver: true,
},
).start(() => {
this._previousLeft = toValue;
Expand Down

0 comments on commit c28595e

Please sign in to comment.