- add react 16 as a peer dep (#94)
- prevent unnecessary rerendering (#85)
- allow passing a children function that takes state and chooses what to render from it (#76)
- Migrated deprecated React.PropTypes and React.createClass (#73)
- Improving offset and adding resize listener (#69)
- added
offset
prop (#64)
- fixed a problem where
.debounceCheck
is not cleared properly (#62)
- fixed typo from
delay
toscrollDelay
(#59)
- added support for "scrollCheck" as well as the default "intervalCheck" (#54)
- simpler logic for
partialVisible
(#41)
partialVisibility
prop can now either be aboolean
(any edge can be visible) or a string oftop|right|bottom|left
to indicate which edge determines visibility (#42)
- Mark partially visible when center is visible (#40)
- Fixed error case where component can be null (#38)
- Added
minTopValue
anddelayedCall
props (#30)
- Removed dist file from git (as suggested in #18)
- Added
npm run build
, which is also run on prepublish - updated the build script so browserify produces a standalone umd script
- added
example-umd
to show how to use it with plain<script>
tags
- return the new state from
.check
method
- upgraded to react 0.14
- removed the
package.browserify
field, which is no longer needed and was causing some conflicts (#11)
- new optional prop
partialVisibility
changes the behaviour of the sensor, so that it considers an element to be visible if it is at least partially visible (#15)
- sensor DOM node is passed in as children rather than the component always rendering its own
<div>
(#13) - this also means the component also no longer accepts
className
orstyle
props.
If you're not setting a className
or style
, no change is required.
Otherwise add your own element as a child and move the className
or style
there. Eg:
- before:
<VisibilitySensor className='something' />
- after:
<VisibilitySensor><div className='something' /></VisibilitySensor>