rc-virtual-list
Advanced tools
Comparing version 0.0.0-alpha.18 to 0.0.0-alpha.19
@@ -550,2 +550,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
if (!isVirtual) { | ||
/** | ||
* Virtual list switch is works on component updated. | ||
* We should double check here if need cut the content. | ||
*/ | ||
var shouldVirtual = requireVirtual(height, itemHeight, data.length); | ||
return React.createElement(Component, Object.assign({ | ||
@@ -562,3 +567,3 @@ style: height ? _objectSpread({}, style, { | ||
height: height | ||
}, this.renderChildren(data, 0, children))); | ||
}, this.renderChildren(shouldVirtual ? data.slice(0, Math.ceil(height / itemHeight)) : data, 0, children))); | ||
} // Use virtual list | ||
@@ -565,0 +570,0 @@ |
@@ -566,2 +566,7 @@ "use strict"; | ||
if (!isVirtual) { | ||
/** | ||
* Virtual list switch is works on component updated. | ||
* We should double check here if need cut the content. | ||
*/ | ||
var shouldVirtual = (0, _itemUtil.requireVirtual)(height, itemHeight, data.length); | ||
return React.createElement(Component, Object.assign({ | ||
@@ -578,3 +583,3 @@ style: height ? _objectSpread({}, style, { | ||
height: height | ||
}, this.renderChildren(data, 0, children))); | ||
}, this.renderChildren(shouldVirtual ? data.slice(0, Math.ceil(height / itemHeight)) : data, 0, children))); | ||
} // Use virtual list | ||
@@ -581,0 +586,0 @@ |
{ | ||
"name": "rc-virtual-list", | ||
"version": "0.0.0-alpha.18", | ||
"version": "0.0.0-alpha.19", | ||
"description": "React Virtual List Component", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
102870
2212