-
Notifications
You must be signed in to change notification settings - Fork 112
Prevent overflow content from being hidden after collapse open #166
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
Conversation
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.
It is hard to say without carefully checking every example on examples page (or npm start). These state changes were carefully tweaked to male everything work and even this small change may easily break third of all cases :(.
Sorry for missing your point on the issue and closing it too early and thanks for your time debugging and doing PR. I will give it a good test asap
Lots of these problems should go away and code would be way simpler when I switch from react-motion to something less react specific. But I don't have much time to do it at the moment
No prob, those kinds of cases are hard to explain with only words, and pretty rare too. |
Hitting this one too - our dropdowns are getting clipped because uncollapsed widget goes into WAITING after the parent component re-renders. Anyway thanks for doing this p/r, hope it gets accepted soon. |
Thanks for ping, I need to do some more checks... One day I may even write tests for this stuff lol |
I have the same problem and this solution worked as a charm. Thanks. |
Yep, that's not good. To handle both cases, we need to figure a way to keep animation + overflow hidden when content is added (when height change?), and don't launch animation when not (when whatever happen that trigger a re-render). So, I'm gonna remove the changes, and add an example in the demos. |
Thanks @meriadec! |
But it gets to By the way, I reckon things like popovers should be outside of containers and attached to body, since you cannot override that overflow thing. Alternatively you can probably set |
It gets to |
Maybe the gif looping make things not clear |
Ok. Another try, here the It seems to solve the problem, and not breaking other examples 😄 What do you think? |
Yep there seems to be a problem with the overflow getting hidden state when re-render happens while the isOpened state doesn't change from true to false. |
@nkbt did you had time to test it? Seems to not break any other demos this time 😄 |
I'm also waiting for this to get merged & released! |
@nkbt would you have time to check this? There are a few waiting. :) |
+1 here as well. Edit: By the way, this works just fine on the ^2.x branch, so if you need this functionality, that version might help you. |
Pga nkbt/react-collapse#166 `Overflow: hidden` blir satt ved rerender selvom state til collapse ikke endrer seg.
Any progress on this issue? Would love to see a fix for this. |
This fix would be perfect |
This would be pretty excellent to have in my company's projects. |
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.
Looks great!
I was experiencing what also @roopemerikukka noticed, that is the The #181 works for me. |
Published |
EDIT outdated: removed the """fix"""
Related to #163.
This commit prevent setting
overflow: hidden
when a new render occur, and theisOpened
prop is still the same (because Collapse move to WAITING state). Now, it pass to WAITING only ifisOpened
has changed. To explain better here is an animated explanation of the problem:before:

after:

I didn't understand the reason why the state is reset to WAITING either
isOpened
ORnextProps.isOpened
is true, so correct me if I break something.Thanks for the package, by the way! 😄