From 84b448b7a77b2a9971c6c5eadd319b56670e53a5 Mon Sep 17 00:00:00 2001 From: Jason Quense Date: Thu, 29 Jun 2017 09:06:42 -0400 Subject: [PATCH] Fixed: onExited callback not fired in TransitionGroup --- src/TransitionGroup.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/TransitionGroup.js b/src/TransitionGroup.js index 40edc718..ad358d3e 100644 --- a/src/TransitionGroup.js +++ b/src/TransitionGroup.js @@ -110,7 +110,13 @@ class TransitionGroup extends React.Component { // Initial children should all be entering, dependent on appear this.state = { children: getChildMapping(props.children, child => { - const onExited = () => this.handleExited(child.key); + const onExited = () => { + if (child.props.onExited) + child.props.onExited(); + + this.handleExited(child.key); + } + return cloneElement(child, { onExited, in: true,