Setting the contentHiddenWhenClosed attribute to true prevents the collapsible from opening at all.
bl-nero opened this issue · comments
Describe the bug
Looks like setting this attribute has a side effect of keeping the height
attribute of the content element permanently at 0.
To Reproduce
Steps to reproduce the behavior:
- Go to https://codesandbox.io/s/happy-jones-v3zks
- Click on "Expand me".
- See that the collapsible attempts to expand (it even performs an animation), but the content doesn't show up.
Expected behavior
The collapsible content should be visible.
Note that this attribute works correctly in version 2.8.1, where it was introduced by @arye-dov-eidelman.
I started looking into it And confirmed that it broke in commit d4c8d7c as part of version 2.8.2.
Setting the element to hidden causes the elements scrollHeight attribute to go back to 0. I'm thinking maybe setting the css visibility: hidden
would be a better way to do this without affecting the height of the element.
Closing due to inactivity