New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spoiler doesn't render label when inside Accordion.Item #1811
Comments
Your content is just not long enough: |
Still doesn't work for me. I think it might be related to this issue with spoiler and collapse #1158 |
Yes, they are the same problem, the Collapse 'display: none' leading to the Spoiler content clientHeight to 0, so not show the label. |
I believe this is caused because we are setting the max height of the Spoiler component using its own offset height (which is 0 when collapsed inside the accordion). It's checked in the useEffect on line 65 of the Spoiler component. It's calculated when the Spoiler component mounts and when the content updates (but not when you expand/collapse the Accordion). |
What package has an issue
@mantine/core
Describe the bug
When placed inside Accordion component Spoiler component won't render labels, making it uncontrollable.
In which browser did the problem occur
Chrome, Firefox
If possible, please include a link to a codesandbox with the reproduced problem
https://codesandbox.io/s/cocky-jang-yfobyv?file=/src/App.js
Do you know how to fix the issue
No
Are you willing to participate in fixing this issue and create a pull request with the fix
No
Possible fix
No response
The text was updated successfully, but these errors were encountered: