Skip to content

ReactCSSTransitionGroup delayed animation #5575

@LKay

Description

@LKay

I have something similar to this to handle sliding up-down content (kind of accordion like behaviour).

<ReactCSSTransitionGroup 
  transitionName="slide"
  transitionEnterTimeout={ TRANSITION_TIMEOUT }
  transitionLeaveTimeout={ TRANSITION_TIMEOUT }
  component="div">
  { expanded && children }
</ReactCSSTransitionGroup>

It works fine, when there was no content and children are being mounted. The problem occurs when there were some nodes than need to be hidden and replaced by false value. In that case it seems that onEnter animation is fired for empty node before executing onLeave animation for previous children node making leaving animation delayed by the time of enter animation for empty node. This shouldn't be happening, I think. Empty node shouldn't be animated when entering DOM or onEnter and onLeave animation should be triggered simultaneously.

I'm using react-addons-css-transition-group in version 0.14.3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions