Skip to content

Commit d829d39

Browse files
committed
repalceTransition bug
1 parent 656df32 commit d829d39

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/common/ReplaceTransitionGroup.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ module.exports = React.createClass({
7272
this.leaving = next
7373
this.entering = nextChild
7474
}
75+
//new child that just needs to be re-rendered
76+
else if (isLastChild) stack.splice(0, 1, nextChild)
77+
else if (isNextChild) stack.splice(1, 1, nextChild)
7578

7679
if( this.state.children[0] !== stack[0] || this.state.children[1] !== stack[1] )
7780
this.setState({ children: stack });

0 commit comments

Comments
 (0)