react-stickynode

A performant and comprehensive React sticky component.

OTHER License

Downloads
467.9K
Stars
1.2K
Committers
36

Bot releases are hidden (Show)

react-stickynode - Initialization of globals during componentDidMount()

Published by src-code over 8 years ago

Global variables related to the client are now initialized during componentDidMount() instead of during module execution.

react-stickynode - Adding z-index support

Published by src-code over 8 years ago

Adding ability to change z-index of the sticky node via the innerZ prop (thanks @samlecuyer!)

react-stickynode - Ignoring scroll events if scrollTop hasn't changed

Published by src-code over 8 years ago

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.

react-stickynode - Add shouldFreeze prop

Published by src-code over 8 years ago

Adds support for shouldFreeze prop, a function which allows an implementor to temporarily disable a sticky node through custom logic.

react-stickynode - Recalculating stickyBottom when in release mode

Published by src-code over 8 years ago

Fixes an issue where in release mode, calculations were being performed with a potentially outdated value for this.stickyBottom.

react-stickynode - Explicitly add displayName for better debugging

Published by kaesonho over 8 years ago

#36 - Explicitly add displayName for better debugging, thanks @itssumitrai !

react-stickynode - Allow passing new props to updateInitialDimension

Published by kaesonho over 8 years ago

#34 - Allow passing new props to updateInitialDimension, thanks @codeheroics !

react-stickynode - Change function to es6 syntax

Published by kaesonho over 8 years ago

#33 - Change function to es6 syntax

react-stickynode - Toggling sticky behavior

Published by kaesonho over 8 years ago

#31 - Toggling sticky behavior, thanks @egadstar !

react-stickynode - fix Sticky not being fixed when calling window.scrollTo()

Published by kaesonho over 8 years ago

#32 - fixed Sticky not being fixed when calling window.scrollTo()

react-stickynode - Compatible with React@15 and [email protected]

Published by hankhsiao over 8 years ago

Now Sticky support React@15 as well!

Thank @roderickhsiao

react-stickynode - Introduce State Change Handling

Published by hankhsiao over 8 years ago

In many situations, we need to do something according to sticky status. Previously, we had contextual class to help us know sticky status, now we have a callback function! Thank you @eligolding.

https://github.com/yahoo/react-stickynode#handling-state-change

react-stickynode - Fix Sticky recalculation issue

Published by hankhsiao over 8 years ago

Fix that Sticky doesn't recalculate dimension when it's parent gets updated.

react-stickynode - Fix some issues

Published by hankhsiao over 8 years ago

Fixed the issue that Sticky is in FIXED status and its height gets changed, it will be always FIXED.

react-stickynode - Introduce active class

Published by hankhsiao over 8 years ago

We introduced a prop activeClass which will set to Sticky class when it is in fixed status. By default, the value of the prop is active. This feature provide flexibility to users to do more their own stuffs.

@fender

react-stickynode - Support responsive

Published by hankhsiao over 8 years ago

In some situation, for example, responsive design, Sticky will be set as display:none. In this case, Sticky should be disable for better performance.

Thanks @testerez.

https://github.com/yahoo/react-stickynode/issues/9

react-stickynode - Bug fix

Published by hankhsiao over 8 years ago

Sticky wrapper will keep the width as that of its content to avoid the width being changed by Sticky state change. This release fixed incorrect calculation of the width.

react-stickynode - Support enableTransforms

Published by hankhsiao over 8 years ago

We added enableTransforms prop in case you cannot add Modernizr, so that you can disable transform. The default is true, so Modernizr is required by default. But still, strongly recommend to use the default value for the performance.

Thank @codeheroics for the contribution.

https://github.com/yahoo/react-stickynode/commit/256fb94df55e7b0010e2c2b10553bc4774aa0b2c

react-stickynode - Better precision on height

Published by hankhsiao over 8 years ago

Using getBoundingClientRect() instead of offsetHeight to get better precision.

react-stickynode - More precise content width

Published by hankhsiao over 8 years ago

Sticky keeps content width, and height to avoid collapse when its state is "fixed". Sticky got width from the offsetWidth of content, but the width is rounded. A better way is to get width from calling getBoundingClientRect(), thank @testerez. To support lower browser (IE8 and lower), we fallback like

var outerRect = outer.getBoundingClientRect();
var width = outerRect.width || outerRect.right - outerRect.left;

https://github.com/yahoo/react-stickynode/pull/17