Socket
Socket
Sign inDemoInstall

rc-virtual-list

Package Overview
Dependencies
12
Maintainers
1
Versions
121
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.0-alpha.4 to 0.0.0-alpha.5

21

es/List.js

@@ -33,2 +33,6 @@ 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); }

import { getIndexByStartLoc, findListDiffIndex } from './utils/algorithmUtil';
var ScrollStyle = {
overflowY: 'auto',
overflowAnchor: 'none'
};
var ITEM_SCALE_RATE = 1;

@@ -438,19 +442,18 @@ /**

itemKey = _this$props4.itemKey,
restProps = _objectWithoutProperties(_this$props4, ["style", "component", "height", "itemHeight", "data", "children", "itemKey"]);
restProps = _objectWithoutProperties(_this$props4, ["style", "component", "height", "itemHeight", "data", "children", "itemKey"]); // Render pure list if not set height or height is enough for all items
var mergedStyle = _objectSpread({}, style, {
height: height,
overflowY: 'auto',
overflowAnchor: 'none'
}); // Render pure list if not set height or height is enough for all items
if (height === undefined || data.length * itemHeight <= height) {
return React.createElement(Component, Object.assign({
style: mergedStyle
style: height ? _objectSpread({}, style, {}, ScrollStyle) : style
}, restProps), React.createElement(Filler, {
height: height
}, this.renderChildren(data, 0, children)));
}
} // Use virtual list
var mergedStyle = _objectSpread({}, style, {
height: height
}, ScrollStyle);
var _this$state4 = this.state,

@@ -457,0 +460,0 @@ status = _this$state4.status,

@@ -48,2 +48,6 @@ "use strict";

var ScrollStyle = {
overflowY: 'auto',
overflowAnchor: 'none'
};
var ITEM_SCALE_RATE = 1;

@@ -453,19 +457,18 @@ /**

itemKey = _this$props4.itemKey,
restProps = _objectWithoutProperties(_this$props4, ["style", "component", "height", "itemHeight", "data", "children", "itemKey"]);
restProps = _objectWithoutProperties(_this$props4, ["style", "component", "height", "itemHeight", "data", "children", "itemKey"]); // Render pure list if not set height or height is enough for all items
var mergedStyle = _objectSpread({}, style, {
height: height,
overflowY: 'auto',
overflowAnchor: 'none'
}); // Render pure list if not set height or height is enough for all items
if (height === undefined || data.length * itemHeight <= height) {
return React.createElement(Component, Object.assign({
style: mergedStyle
style: height ? _objectSpread({}, style, {}, ScrollStyle) : style
}, restProps), React.createElement(_Filler.default, {
height: height
}, this.renderChildren(data, 0, children)));
}
} // Use virtual list
var mergedStyle = _objectSpread({}, style, {
height: height
}, ScrollStyle);
var _this$state4 = this.state,

@@ -472,0 +475,0 @@ status = _this$state4.status,

{
"name": "rc-virtual-list",
"version": "0.0.0-alpha.4",
"version": "0.0.0-alpha.5",
"description": "React Virtual List Component",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc