RN: Add `close` to SwipeableRow
Reviewed By: sahrens Differential Revision: D5365597 fbshipit-source-id: 18cc896b551ce11b64c85067d5f17b3614762814
This commit is contained in:
parent
6312d67bcb
commit
c28595e3fb
|
@ -190,6 +190,11 @@ const SwipeableRow = React.createClass({
|
|||
);
|
||||
},
|
||||
|
||||
close(): void {
|
||||
this.props.onClose();
|
||||
this._animateToClosedPosition();
|
||||
},
|
||||
|
||||
_onSwipeableViewLayout(event: Object): void {
|
||||
this.setState({
|
||||
isSwipeableViewRendered: true,
|
||||
|
@ -268,6 +273,7 @@ const SwipeableRow = React.createClass({
|
|||
{
|
||||
duration,
|
||||
toValue,
|
||||
useNativeDriver: true,
|
||||
},
|
||||
).start(() => {
|
||||
this._previousLeft = toValue;
|
||||
|
|
Loading…
Reference in New Issue