nkbt / react-collapse

Component-wrapper for collapse animation with react-motion for elements with variable (and dynamic) height
MIT License
1.13k stars 113 forks source link

Empty parent collapse hides nested collapse #202

Closed sjurlur closed 5 years ago

sjurlur commented 7 years ago

If i have a nested collapse where the root has no other content than the nested collapse, height is set to 0 and child items are not shown.

If i add content to the root in addition to child collapse, height gets calculated.

Works:

<Collapse isOpened hasNestedCollapse>
  content
  <Collapse isOpened>childContent</Collapse>
</Collapse>

Fails:

<Collapse isOpened hasNestedCollapse>
  <Collapse isOpened>childContent</Collapse>
</Collapse>

Example: https://codepen.io/sjurlur/pen/JOorNj

nkbt commented 5 years ago

As new react-collapse@5.0.0 is released https://github.com/nkbt/react-collapse/releases/tag/v5.0.0 this issue has been most likely already solved.

Please feel free to re-open if the issue persists