Giter Club home page Giter Club logo

Comments (4)

nkbt avatar nkbt commented on July 18, 2024 1

Hey, @sassanh!

I add hasNestedCollapse prop and updated your codepen: https://codepen.io/nkbt/pen/WxBJdW?editors=0010

It works well now!

Please, reopen if you have more questions about this or open new issues if something else is not working

Thanks for codepen by the way - saved heaps of time for me!

from react-collapse.

sassanh avatar sassanh commented on July 18, 2024

@nkbt sorry I don't understand what you mean by passing props through parent Collapse, in the Codepen example (https://codepen.io/sassanh/pen/GqLZVy?editors=0010) I'm not passing any props "through" parent Collapse tag. I'm just providing isOpened for it.

from react-collapse.

sassanh avatar sassanh commented on July 18, 2024

I'm glad codepen helped. Thanks a lot.

from react-collapse.

rijk avatar rijk commented on July 18, 2024

@nkbt , I've been reading through your commits and checked out the codepen, but I'm still not clear what this does exactly? Changing to hasNestedCollapse={false} in the codepen seems to make no difference. What should I be looking at?

My use case is slightly more complex:

<Collapse>
   ... content
   <Collapse />
   ... content
   ... content
   <Collapse />
</Collapse>

(it is a timeline of comments, and the replies to a comment are rendered in another Collapse). So whether the parent <Collapse> should animate, depends on where the action is occurring:

  • if it's in the content (e.g. a comment that was added/deleted) it should animate;
  • if it's in a child <Collapse> (e.g. a reply added) it should not.

Was this parameter meant for this type of use case as well? How do I best approach this?

Great library btw, keep up the good work.

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.