open-amdocs / webrix

Powerful building blocks for React-based web applications
https://webrix.amdocs.com
Apache License 2.0
432 stars 32 forks source link

Scrollbars visibility fails to update when content size changes #47

Closed ykadosh closed 3 years ago

ykadosh commented 3 years ago

Currently, we use a <ResizeObserver/> on the container, but rely on the componentDidUpdate lifecycle of <Scrollable/> to check when the content has changed in size.

This doesn't always work, because the children can be updated without ever going into the componentDidUpdate of the containing <Scrollable/>

This issue can be seen in this sandbox example: https://codesandbox.io/s/wispy-glade-5dbw8?file=/Example.jsx Click on the toggle button and notice how the scrollbar doesn't appear until you try to scroll. Moreover, when you collapse it, the scrollbar is never removed.

udia76 commented 3 years ago

:tada: This issue has been resolved in version 1.3.1-next.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

udia76 commented 3 years ago

:tada: This issue has been resolved in version 1.3.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: