Releases: yahoo/react-stickynode
Fix dist package issue
v1.2.1 Release v1.2.1.
Add `releasedClass` prop
This will apply a class to the outer container conditionally when the component is in a released state.
Thanks @nason
Switching to react-addons-shallow-compare
Switching to use react-addons-shallow-compare
instead of is-equal-shallow
, which tends to return false negatives for props. This should result in fewer unnecessary re-renders of the stickynode component, and so better performance.
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 !