Giter Club home page Giter Club logo

Comments (8)

ivan-gerasin avatar ivan-gerasin commented on July 18, 2024

I'm also met this bug several days ago. I'm looking forward for the moment when this bug will be fixed, and I can use this lib.

from react-collapse.

nkbt avatar nkbt commented on July 18, 2024

Hi @GeraldIstar! If you can debug it a bit and find the fix - that would be awesome. I would really appreciate any help!

from react-collapse.

ivan-gerasin avatar ivan-gerasin commented on July 18, 2024

Looks like problem is near to defaultStyle of Motion component
Here, in most cases compoent start from 0, but some times height provided from state is also equal to 0 (not sure, might be my fault).
https://github.com/nkbt/react-collapse/blob/master/src/Collapse.js#L151
This cause that 0-height is provided to newStyle here:
https://github.com/nkbt/react-collapse/blob/master/src/Collapse.js#L169
But I've just spent few time, and can suggest that I missed somthing.

from react-collapse.

davidspiess avatar davidspiess commented on July 18, 2024

Any news on this? I'm experiencing the same :(

from react-collapse.

davidspiess avatar davidspiess commented on July 18, 2024

The Motion component needs to have the same height set in defaultStyle as in the previously rendered static div. It's quite tricky to solve as at the moment there is no way to tell if the previous render call was a static one or not. Storing the static height between calls could be a solution but seems quite hacky to me. Any ideas?

from react-collapse.

nkbt avatar nkbt commented on July 18, 2024

@davidspiess I actually store current height between calls, so it is as hacky as hell already ;)

This does not seem like a hugely complicated issue (comparing to the flexbox one, for example). There is a PR, I'll check it asap.

from react-collapse.

nkbt avatar nkbt commented on July 18, 2024

Thanks to @GeraldIstar, it's all good now \o/

from react-collapse.

nkbt avatar nkbt commented on July 18, 2024

https://github.com/nkbt/react-collapse/releases/tag/v2.2.1

from react-collapse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.