Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use timeout props without exit time #460

Closed
LiuuY opened this issue Feb 19, 2019 · 2 comments
Closed

use timeout props without exit time #460

LiuuY opened this issue Feb 19, 2019 · 2 comments
Labels

Comments

@LiuuY
Copy link

LiuuY commented Feb 19, 2019

Do you want to request a feature or report a bug?

bug, maybe?

What is the current behavior?

if I use timeout props without exit time, eg,

<CSSTransition
  key={id}
  timeout={{
    enter: 300,
    // no exit time
  }}
  classNames="fade"
>

https://codesandbox.io/s/wnjp84n125

Click the red X button, after the animation, the element that should (?) be removed from DOM tree is still there.

Is this a feature or a bug?

image

version: 2.2.1

@silvenon
Copy link
Collaborator

I think this is unexpected behavior. I think the expected behavior should be to raise an error or warning, because I don't know if there is a sensible default value we could add for exit. (Maybe 0?)

@silvenon silvenon added the bug label Feb 20, 2019
silvenon pushed a commit that referenced this issue Mar 5, 2019
* fix bug from issue #460

* Update src/Transition.js

Co-Authored-By: dimensi <eddimensi@gmail.com>

* fix grammar and remove required from exit, enter props

* rewrite test

* little update
@silvenon
Copy link
Collaborator

silvenon commented Mar 5, 2019

Solved with #464. exit timeout now defaults to 0, which I consider intuitive behavior.

@silvenon silvenon closed this as completed Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants