Releases: yahoo/react-stickynode
Initialization of globals during componentDidMount()
Global variables related to the client are now initialized during componentDidMount()
instead of during module execution.
Adding z-index support
Adding ability to change z-index
of the sticky node via the innerZ
prop (thanks @samlecuyer!)
Ignoring scroll events if scrollTop hasn't changed
If a scrollStart
event is received but the scrollTop
value doesn't seem to have changed from the cached value, skip handling the event and the subsequent scroll
event. This fixes an issue seen when the document's scroll position is being restored (eg, during a page navigation event in a single page app) and sticky may incorrectly attempt to reposition itself due to the scroll event.
Recalculating stickyBottom when in release mode
Fixes an issue where in release mode, calculations were being performed with a potentially outdated value for this.stickyBottom
.
Add shouldFreeze prop
Adds support for shouldFreeze
prop, a function which allows an implementor to temporarily disable a sticky node through custom logic.
Explicitly add displayName for better debugging
#36 - Explicitly add displayName for better debugging, thanks @itssumitrai !
Allow passing new props to updateInitialDimension
#34 - Allow passing new props to updateInitialDimension, thanks @codeheroics !
Change function to es6 syntax
#33 - Change function to es6 syntax
Toggling sticky behavior
fix Sticky not being fixed when calling window.scrollTo()
#32 - fixed Sticky not being fixed when calling window.scrollTo()