Closed atengberg closed 1 year ago
Hi @atengberg, If you could please create an example on codesandbox (or any other live code sandbox) I would be very grateful. It is hard for me to debug the problem without it. If you can do that I think we'll able to find a solution. Cheers!
Thanks for replying so quickly. I remade it and could not reproduce the issue, but in this version I hadn't used Tailwind.
When I have some more time I'll try including Tailwind and seeing if I can reproduce it.
Thanks for the update. If you encounter the issue again, feel free to re-open this issue.
Using React and Tailwind, I've got:
However when
children
has slight more height than the scroll container's clientHeight, it creates a endless loop where when the animation triggers, the reduced height ofAnimateHeight
means the scrollable content no longer requires a scrollbar, which in causes the scrollTop (top) to reset to 0, which causes the scrollbar to reappear, when scrolled causesAnimateHeight
to shrink and so on.Is there a best / better way to handle this?