Add fool tolerance

master v1.0.9
Vitaliy Filippov 2019-07-04 15:49:14 +03:00
parent 7520acd02d
commit b7df500935
2 changed files with 6 additions and 1 deletions

View File

@ -181,6 +181,11 @@ export class VirtualScrollList extends React.Component
driver = () => driver = () =>
{ {
if (!this.viewport || !this.viewport.offsetParent)
{
// Fool tolerance - do nothing if we are hidden
return false;
}
const newState = virtualScrollDriver( const newState = virtualScrollDriver(
{ {
totalItems: this.props.totalItems, totalItems: this.props.totalItems,

View File

@ -1,6 +1,6 @@
{ {
"name": "dynamic-virtual-scroll", "name": "dynamic-virtual-scroll",
"version": "1.0.8", "version": "1.0.9",
"author": { "author": {
"name": "Vitaliy Filippov", "name": "Vitaliy Filippov",
"email": "vitalif@yourcmc.ru", "email": "vitalif@yourcmc.ru",