react-virtual-list
Advanced tools
Comparing version 2.2.3 to 2.2.4
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -56,2 +56,5 @@ 'use strict'; | ||
_this._isMounted = false; | ||
_this.options = _extends({ | ||
@@ -86,2 +89,6 @@ container: typeof window !== 'undefined' ? window : undefined | ||
if (state === undefined) { | ||
return; | ||
} | ||
if (state.firstItemIndex > state.lastItemIndex) { | ||
@@ -91,3 +98,3 @@ return; | ||
if (state !== undefined && (state.firstItemIndex !== this.state.firstItemIndex || state.lastItemIndex !== this.state.lastItemIndex)) { | ||
if (state.firstItemIndex !== this.state.firstItemIndex || state.lastItemIndex !== this.state.lastItemIndex) { | ||
this.setState(state); | ||
@@ -99,2 +106,6 @@ } | ||
value: function refreshState() { | ||
if (!this._isMounted) { | ||
return; | ||
} | ||
var _props = this.props, | ||
@@ -109,2 +120,7 @@ itemHeight = _props.itemHeight, | ||
}, { | ||
key: 'componentWillMount', | ||
value: function componentWillMount() { | ||
this._isMounted = true; | ||
} | ||
}, { | ||
key: 'componentDidMount', | ||
@@ -125,2 +141,4 @@ value: function componentDidMount() { | ||
value: function componentWillUnmount() { | ||
this._isMounted = false; | ||
// remove events | ||
@@ -127,0 +145,0 @@ this.options.container.removeEventListener('scroll', this.refreshState); |
{ | ||
"name": "react-virtual-list", | ||
"version": "2.2.3", | ||
"version": "2.2.4", | ||
"description": "Super simple virtualized list React higher-order component", | ||
@@ -5,0 +5,0 @@ "main": "lib/VirtualList.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
225163
1488