-
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
Setting dynamic height to 'auto' #9
Comments
That might be related to some awkward global styling done by Bootstrap or Height-auto is necessary to get real content height of children components, you can completely avoid it by setting Css is hard, global css is sometimes impossibly hard. I can debug that for you and probably come with some more universal fix, if you can kindly provide with some Codepen example (or some repo I can run and reproduce the issue) |
http://codepen.io/anon/pen/NGzpbB?editors=001 Thanks for your help |
Hi. Have you found a solution? |
I did some code cleanup, updated deps to the most recent versions, and most importantly switched to using state and ReactDOM.render. That seems to fix the problem http://codepen.io/nkbt/pen/JYBQaw I'll check if that would work with the old version too... |
Ah also you hide element when it is not visible. That obviously won't work. For some reason (older) 1.1.2 Collapse is not re-rendered. It even does not get props! Which means React ignores changes.. |
Sorry for late reply, was quite busy these days. I'm closing the ticket, feel free to re-open if you have more concerns |
I can't see any animation in your snippet :( |
Oh wow, there is definitely something with Bootstrap styles. Depending on screen width it works sometimes. Like when screen is narrow enough. I'll dig a bit more. But before I will update react-collapse since it looks like I've solved a pretty big problem there today, which might help |
Okay, I see it. The problem is with floating elements inside Collapse. Since At the moment I reduced number of wrapping divs to the bare minimum and can't remove ReactHeight's div for now (also can't allow to style it). I guess it might be possible to overcome this issue and keep only one ReactCollapse's div (which is completely styleable), but cannot promise that will happen soon. If you put your I updated my fork in this way and it now works fine http://codepen.io/nkbt/pen/JYBQaw?editors=001 |
I could potentially add |
Putting the row div inside the collapse component can be a good workaround. |
I'm using Collapse plugin to create a collpasable div. It works but it doesn't animate. I think it is because the plugin set the height to 'auto'. Why this happens? Can I fix it without setting the height manually?
The text was updated successfully, but these errors were encountered: