Giter Club home page Giter Club logo

Comments (10)

nkbt avatar nkbt commented on July 18, 2024

That seems like a bug it it actually goes like that. With keepCollapsedContent children should be never destroyed.

Do you have an example to reproduce it? Maybe codepen?

Cheers

from react-collapse.

jooj123 avatar jooj123 commented on July 18, 2024

Reproducing this in code pen is a little different, but i think its related to the same issue:
https://codepen.io/jooj123/pen/qNLXNJ

Notice the 2 unnecessary unmounts:
screen shot 2016-08-11 at 10 58 21 am

from react-collapse.

nkbt avatar nkbt commented on July 18, 2024

Should be fixed with #72, I am adding this to the list of examples

from react-collapse.

jooj123 avatar jooj123 commented on July 18, 2024

NIce ! looking forward to the big update !

from react-collapse.

nkbt avatar nkbt commented on July 18, 2024

Just published react-collapse@next (not latest channel yet until better tested) with full rewrite, which fixes this issue. Give it a shot if you are keen.

from react-collapse.

jooj123 avatar jooj123 commented on July 18, 2024

I just checked it out - everything seems to wok correctly except in my use case for some reason the animation has got a bit clunky, any ideas why that my be?

Will try and provide another code pen (and submit another issue) if there is a script tag I can use that has the latest version (not sure if there is)

from react-collapse.

nkbt avatar nkbt commented on July 18, 2024

Thanks!

https://npmcdn.com/[email protected]/build/react-collapse.js this would do. I did some more changes, but not published yet (not that it might change the behaviour anyway)

from react-collapse.

nkbt avatar nkbt commented on July 18, 2024

re-published newer version https://npmcdn.com/[email protected]/build/react-collapse.js

Probably better to use https://npmcdn.com/react-collapse@next/build/react-collapse.js

from react-collapse.

jooj123 avatar jooj123 commented on July 18, 2024

I was unable to reproduce the issue in codepen - must be related to my code base which has many nested components with each collapse, will be some time until i can find the issue

from react-collapse.

acarl avatar acarl commented on July 18, 2024

I just wanted to note that I was able to duplicate this issue in a simple scenario with 4.0.3.

The child content gets unrendered on each collapse.

I switched to react-smooth-collapse as a result.

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.