-
Notifications
You must be signed in to change notification settings - Fork 17
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
Conversation
transition(animationType, finishCallback, timeout) { | ||
let node = getComponentBase(this); | ||
|
||
let className = this.props.name[animationType] || this.props.name + '-' + animationType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this neccesary?
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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
@hassanbazzi & @developit : can we merge the PR ? |
@developit please review ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thx @developit 👍 |
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 ?