Skip to content

Commit

Permalink
Add optional callback to translateX (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
baugarten authored and xotahal committed Aug 23, 2019
1 parent d4a7e8c commit 65e1353
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/TranslateX.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ class TranslateX extends PureComponent {
}
}
move = toValue => {
const { style, type, ...rest } = this.props;
const { style, onMoveDidFinish, type, ...rest } = this.props;
const { translateXValue } = this.state;

Animated[type](translateXValue, {
toValue,
...rest,
}).start();
}).start(onMoveDidFinish);
};
render() {
const { style, children } = this.props;
Expand Down

0 comments on commit 65e1353

Please sign in to comment.