File tree Expand file tree Collapse file tree 4 files changed +8
-6
lines changed
Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 77 "url" : " https://github.com/researchgate/react-intersection-list/issues"
88 },
99 "dependencies" : {
10- "@researchgate/react-intersection-observer" : " ^0.7.1 " ,
10+ "@researchgate/react-intersection-observer" : " ^0.7.3 " ,
1111 "prop-types" : " ^15.6.1" ,
1212 "react-lifecycles-compat" : " ^3.0.4" ,
1313 "warning" : " ^4.0.1"
Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ class Sentinel extends Component {
4343 // its threshold prematurely. In this case we don't get any update from the Observer instance.
4444 // We need to guarantee an update, and re-observing is a cheap way to accomplish this.
4545 if ( currentRootMargin === rootMargin && currentRootElement === rootElement ) {
46- this . element . reobserve ( ) ;
46+ this . element . unobserve ( ) ;
47+ this . element . observe ( ) ;
4748 return false ;
4849 }
4950 return true ;
Original file line number Diff line number Diff line change @@ -69,7 +69,8 @@ describe('render', () => {
6969 const renderSpy = jest . spyOn ( tree . getInstance ( ) , 'render' ) ;
7070 const spy = jest . fn ( ) ;
7171 tree . getInstance ( ) . element = {
72- reobserve : spy ,
72+ unobserve : spy ,
73+ observe : spy ,
7374 } ;
7475 tree . update ( < Sentinel { ...defaultProps } /> ) ;
7576 expect ( renderSpy ) . not . toBeCalled ( ) ;
Original file line number Diff line number Diff line change 9191 dependencies :
9292 " @researchgate/eslint-config-rg-base" " ^2.0.0"
9393
94- " @researchgate/react-intersection-observer@^0.7.1 " :
95- version "0.7.1 "
96- resolved "https://registry.yarnpkg.com/@researchgate/react-intersection-observer/-/react-intersection-observer-0.7.1 .tgz#c63d0d133d9f121fc34d5019dd5a0a4d3c87f32a "
94+ " @researchgate/react-intersection-observer@^0.7.3 " :
95+ version "0.7.3 "
96+ resolved "https://registry.yarnpkg.com/@researchgate/react-intersection-observer/-/react-intersection-observer-0.7.3 .tgz#cef70feae9ccb33d5104fa8bf4c8c3ddc049d5fa "
9797 dependencies :
9898 invariant "^2.2.2"
9999 prop-types "^15.6.0"
You can’t perform that action at this time.
0 commit comments