New content is not displayed if section is initially expanded and content was dynamically changed from empty
Closed this issue · 1 comments
Hello!
I have encountered an issue where content is not displayed if it was dynamically changed in already expanded section
Initial situation:
<Collapse isOpened={true}>
<div style={{height: 0}} />
</Collapse>
When I fetch some data and it becomes
<Collapse isOpened={true}>
<div style={{height: 100}} />
</Collapse>
At this point nothing is displayed, collapse sticks to 0 height. If in initial situation height would be 1 content would correctly be displayed.
I've prepared example of this situation - https://codesandbox.io/s/oqo0zp1j19 (navigate to Content.js
file).
Try changing height: 0
to height: 1
to see that in case of non-zero height it works correctly.
Thank you for your help and maintaing this component!
Cheers :)
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