-
Notifications
You must be signed in to change notification settings - Fork 113
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
Collapse with nested Collapse is kept forever in WAITING state #76
Comments
@nkbt sorry I don't understand what you mean by passing props through parent |
Hey, @sassanh! I add It works well now! Please, reopen if you have more questions about this or open new issues if something else is not working Thanks for codepen by the way - saved heaps of time for me! |
I'm glad codepen helped. Thanks a lot. |
@nkbt , I've been reading through your commits and checked out the codepen, but I'm still not clear what this does exactly? Changing to My use case is slightly more complex:
(it is a timeline of comments, and the replies to a comment are rendered in another Collapse). So whether the parent
Was this parameter meant for this type of use case as well? How do I best approach this? Great library btw, keep up the good work. |
From #34 (comment)
The solution for now is to not pass any props through parent collapse if only children are changed (so children should be connected to a flux/redux store or something). Now when props of paren collapse are changed it is transitioned to state
WAITING
, which locks itsheight
. Since it is own height is not changed after that (because children are expanded with animation, so the next step height is exactly as it was before) - it may forever stay in this state =(.So it works perfectly when children are expanded instantly (no nested collapse), but not working when collapse elements are nested.
I consider adding a flag
hasNestedCollapse
to skip this transition toWAITING
state. This way everything would work perfectly since it hasheight: auto
.The text was updated successfully, but these errors were encountered: