From 9a30c3bcef21c25e2c09b3ebc9d4fd592f07e62c Mon Sep 17 00:00:00 2001 From: Hongxu Liu Date: Sat, 7 Oct 2017 10:37:01 -0500 Subject: [PATCH] Added onClose prop --- react-swipe-to-reveal-options.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/react-swipe-to-reveal-options.js b/react-swipe-to-reveal-options.js index aa7802c..102112c 100644 --- a/react-swipe-to-reveal-options.js +++ b/react-swipe-to-reveal-options.js @@ -204,6 +204,7 @@ onRightClick: React.PropTypes.func, onLeftClick: React.PropTypes.func, onReveal: React.PropTypes.func, + onClose: React.PropTypes.func, maxItemWidth: React.PropTypes.number, parentWidth: React.PropTypes.number }, @@ -235,6 +236,7 @@ onRightClick: function onRightClick() {}, onLeftClick: function onLeftClick() {}, onReveal: function onReveal() {}, + onClose: function onClose() {}, closeOthers: function closeOthers() {}, maxItemWidth: 120, parentWidth: (typeof window !== 'undefined' && window.outerWidth) || (typeof screen !== 'undefined' && screen.width) || 320 @@ -422,6 +424,7 @@ }, transitionBack: function transitionBack() { + this.props.onClose(); this.setState({ showLeftButtons: false, showRightButtons: false,