Releases: compulim/react-scroll-to-bottom
Releases · compulim/react-scroll-to-bottom
[4.2.0] - 2021-10-14
Changed
- Added support of GitHub Codespaces, by @compulim in PR #104
- Changed peer dependencies requirement to
react >= 16.8.6, by @compulim in PR #104 - Bumped dependencies, by @compulim in PR #104
- Production dependencies
- Non-production dependencies
@babel/[email protected]@babel/[email protected]@babel/[email protected]@testing-library/[email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected]
[4.1.2] - 2021-05-18
[4.1.1] - 2021-05-14
Added
- Added a test harness, in PR #85
Fixed
- Fixed #75. If
debugis set, it will show debug in console log. If not specified, it will fallback toNODE_ENV === 'production', in PR #77. - Fixed #84. Fixed a race condition: while under heavy load, sticky, and at the end, calling
useScrollTo()to any positions, the scroll view may scroll back to the bottom immediately, in PR #85
[4.1.0] - 2021-01-04
Added
- Added
scrollerprop for limiting scroll distance whenmodeis set tobottom, in PR #73 - Added
initialScrollBehaviorprop for first scroll behavior. When set to"auto"(discrete scrolling), it will jump to end on initialization. in PR #73 - Added
debugprop for dumping debug log to console, in PR #73 - Improved performance by separating
StateContextinto 2 tiers, in PR #73
Fixed
- Emptying container should regain stickiness, in PR #73
[4.0.0] - 2020-09-01
Added
- Support
nonceprop for Content Security Policy, in PR #62, PR #63 and PR #64
Changed
- Moved from
[email protected]to[email protected], in PR #62
[3.0.0] - 2020-06-22
Breaking changes
scrollToBottom/scrollToEnd/scrollToStart/scrollToTopnow accept an option{ behavior: 'auto' | 'smooth' }- Without the option, it is by default to artificial smooth scrolling (
smooth), to keep existing behavior - This behavior may change in the future, by defaulting to discrete scrolling (
auto), to better align with HTMLDOMElement.scrollIntoViewstandard - During the transition, please always pass
{ behavior: 'smooth' }to keep existing behavior
- Without the option, it is by default to artificial smooth scrolling (
Changed
- Bump dependencies, in PR #50
Added
- Added version number to
<meta name="react-scroll-to-bottom:version">for diagnostic purpose, in PR #51 - Added
useAnimatingToEndgetter to indicate if it is animating towards to the end, in PR #49- The existing
useAnimatinggetter only indicate if it is animating to any scroll positions
- The existing
- Added
scrollTofunction to scroll to a specificscrollTopvalue, this is similar toDOMElement.scrollIntoView(), in PR #49- The signature is
scrollTo(scrollTop: number, options: { behavior: 'auto' | 'smooth' }) - Pass
{ behavior: 'smooth' }for synthetic smooth scrolling
- The signature is
- Added
useObserveScrollTophook to observe scroll event, in PR #49- This effect function will be called rapidly on scroll, please avoid expensive code such as calling setter of
useStateand any code that would cause re-render
- This effect function will be called rapidly on scroll, please avoid expensive code such as calling setter of
Fixed
[2.0.0] - 2020-05-07
Breaking changes
- We moved to React Hooks and it requires React 16.8.6 or up
- Hooks will allow us to write simpler and more maintainable code
- Developers can use our React Hooks to perform various operations
Changed
- Moved all code to React functional components, in PR #31
*: bump dependencies, in PR #47@babel/[email protected]@babel/[email protected]@babel/[email protected]@babel/[email protected]@babel/[email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected]
*: bump dependencies, in PR #31*: bump dependencies, in PR #27
Added
Fixed
[1.3.2] - 2019-06-20
[1.3.1] - 2019-02-13
[1.3.0] - 2019-01-21
Changed
- Playground: bumped to
[email protected],[email protected], and[email protected] *: Update algorithm, instead of usingcomponentDidUpdate, we now usesetIntervalto check if the panel is sticky or not, this help to track content update that happen outside of React lifecycle, for example,HTMLImageElement.onloadeventComposer:scrollTo()now accepts"100%"instead of"bottom"
Removed
- Removed
thresholdprops because the algorithm is now more robust