-
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
Wrong height calculated in nested components #34
Comments
Ul/LI have some padding/margins by default (as you can easily check in dev tools). If you don't reset them to 0 or don't use proper wrapper (block element, without padding/margins) - behaviour may not be as expected. Margins are the most trickiest ones. Better compensate them with paddings of collapsible container |
Hmm. |
Could you please create a Codepen to try it out? Thanks! |
Hey :). Steps to reproduce:
I hope you can reproduce it :). |
Need to doublecheck if height is re-measured after |
I really need chenglou/react-motion#273 to be published, that would allow me to fix this issue quite effectively. |
Yeah really waiting for this to be fix. |
Heads up: |
It is actually released as far as I know.
|
Weird since this was merged on 29 of january an the is only on gh release which was made on the 30. Anyway, @nkbt do you have time to work on this ? |
I do and I will when I am back from holidays :) No worries.
|
Any news here? :) |
oh jeez that was hell of a holiday I reckon... Thanks for ping @davidspiess |
Most likely to be fixed by #72 |
Just published |
@nkbt thanks for this great module, I found the nested behavior is not still buggy if you use more than one |
Yeah I found issues with nested collapse too recently. Can be solved by PS: we are using collapse quite extensively in our work projects, so this Thanks a lot for a Codepen, I will add it to examples when I have some
|
I'm glad to hear it'll be fixed. Meanwhile do you know any simple temporary workaround for this? |
Nvm, I was able to handle it with defining a |
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 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 |
Thanks for info, I'll continue on that issue then. |
Hello.
I found a strange behavior with react collapse when you dont wrap the content inside a div with padding > 0.
The problem appears inside my sidebar menu.
I took the Nested.js from the examples and modified it. So it should be easy to reproduce it.
This code works:
This one calculates the height wrong and jumps the the right size after animation is finished.
Here's how it looks.
Thank you in advance. :)
The text was updated successfully, but these errors were encountered: