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

Support transitionEnterTimeout & transitionLeaveTimeout #13

Merged
merged 3 commits into from
Jun 20, 2017

Conversation

myarcane
Copy link
Contributor

@myarcane myarcane commented Jun 8, 2017

Description

transitionEnterTimeout & transitionLeaveTimeout are new <CSSTransitionGroup/> props.
These props were already implemented in the original react repository. So this is simply a minimal port of the react implementation.

Why ?

In many cases, the transitionend is not reliable (check #8 (comment)). Adding timeout is a way to solve the issue.

How to use ?

<CSSTransitionGroup
   transitionName="example"
   transitionEnterTimeout={300}
   transitionLeaveTimeout={300}
   ...
 />

transition(animationType, finishCallback, timeout) {
let node = getComponentBase(this);

let className = this.props.name[animationType] || this.props.name + '-' + animationType;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this neccesary?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what it's doing myself, but I am not super familiar with how this lib is used. Mybe @myarcane can give us some context :)

Copy link
Contributor Author

@myarcane myarcane Jun 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @hassanbazzi & @developit :
I didn't do anything particular here. I've just removed the grouped coma declaration. Nothing else !
And I think className is still needed 👉 https://github.com/myarcane/preact-css-transition-group/blob/663cd4e90dc8476290f955b5829d60ced9d89ff3/src/CSSTransitionGroupChild.js#L56

@myarcane
Copy link
Contributor Author

@hassanbazzi & @developit : can we merge the PR ?

@trsh
Copy link

trsh commented Jun 20, 2017

@developit please review !

Copy link
Owner

@developit developit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@developit developit merged commit 810f9f2 into developit:master Jun 20, 2017
@myarcane
Copy link
Contributor Author

Thx @developit 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants