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 7
7
"url" : " https://github.com/researchgate/react-intersection-list/issues"
8
8
},
9
9
"dependencies" : {
10
- "@researchgate/react-intersection-observer" : " ^0.7.1 " ,
10
+ "@researchgate/react-intersection-observer" : " ^0.7.3 " ,
11
11
"prop-types" : " ^15.6.1" ,
12
12
"react-lifecycles-compat" : " ^3.0.4" ,
13
13
"warning" : " ^4.0.1"
Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ class Sentinel extends Component {
43
43
// its threshold prematurely. In this case we don't get any update from the Observer instance.
44
44
// We need to guarantee an update, and re-observing is a cheap way to accomplish this.
45
45
if ( currentRootMargin === rootMargin && currentRootElement === rootElement ) {
46
- this . element . reobserve ( ) ;
46
+ this . element . unobserve ( ) ;
47
+ this . element . observe ( ) ;
47
48
return false ;
48
49
}
49
50
return true ;
Original file line number Diff line number Diff line change @@ -69,7 +69,8 @@ describe('render', () => {
69
69
const renderSpy = jest . spyOn ( tree . getInstance ( ) , 'render' ) ;
70
70
const spy = jest . fn ( ) ;
71
71
tree . getInstance ( ) . element = {
72
- reobserve : spy ,
72
+ unobserve : spy ,
73
+ observe : spy ,
73
74
} ;
74
75
tree . update ( < Sentinel { ...defaultProps } /> ) ;
75
76
expect ( renderSpy ) . not . toBeCalled ( ) ;
Original file line number Diff line number Diff line change 91
91
dependencies :
92
92
" @researchgate/eslint-config-rg-base" " ^2.0.0"
93
93
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 "
97
97
dependencies :
98
98
invariant "^2.2.2"
99
99
prop-types "^15.6.0"
You can’t perform that action at this time.
0 commit comments