Releases: exogen/react-overflow-indicator
Releases · exogen/react-overflow-indicator
v0.2.2
v0.2.1
Bug Fix
Using the previous threshold
and isIntersecting
check, in rare circumstances Firefox's IntersectionObserver implementation seems to think there is still overflow even when a container is scrolled all the way to one end.
It would report an IntersectionObserver entry with an intersectionRatio of 0 and isIntersecting of true, which doesn't really make any sense.
I suspect it's due to non-integer element sizes (like if you have an element whose width is purely based on its text content, it could get a width like 120.45).
Either adding another threshold entry of 0 and also checking intersectionRatio both seem to fix it. I'm doing both to play it safe.
v0.2.0
New Feature
- When using a child function in
<Overflow.Indicator>
, it will now receive a secondrefs
argument. This provides access to theviewport
ref – you can use this to build an indicator that is also a button that scrolls the viewport. - The new
useOverflow
hook provides access to the Overflow component’s state and refs.
Performance
- When using a nonzero
tolerance
value, the generated tolerance element is now memoized.