Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rc-virtual-list

Package Overview
Dependencies
Maintainers
1
Versions
128
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-virtual-list - npm Package Compare versions

Comparing version 3.3.0 to 3.4.0

2

es/List.d.ts

@@ -30,2 +30,4 @@ import * as React from 'react';

onScroll?: React.UIEventHandler<HTMLElement>;
/** Trigger when render list item changed */
onVisibleChange?: (visibleList: T[], fullList: T[]) => void;
}

@@ -32,0 +34,0 @@ export declare function RawList<T>(props: ListProps<T>, ref: React.Ref<ListRef>): JSX.Element;

16

es/List.js

@@ -1,2 +0,2 @@

var _excluded = ["prefixCls", "className", "height", "itemHeight", "fullHeight", "style", "data", "children", "itemKey", "virtual", "component", "onScroll"];
var _excluded = ["prefixCls", "className", "height", "itemHeight", "fullHeight", "style", "data", "children", "itemKey", "virtual", "component", "onScroll", "onVisibleChange"];

@@ -28,3 +28,3 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

import * as React from 'react';
import { useRef, useState } from 'react';
import { useRef, useState, useLayoutEffect } from 'react';
import classNames from 'classnames';

@@ -61,2 +61,3 @@ import Filler from './Filler';

onScroll = props.onScroll,
onVisibleChange = props.onVisibleChange,
restProps = _objectWithoutProperties(props, _excluded); // ================================= MISC =================================

@@ -276,3 +277,3 @@

});
React.useLayoutEffect(function () {
useLayoutEffect(function () {
// Firefox only

@@ -304,4 +305,11 @@ function onMozMousePixelScroll(e) {

};
}); // ================================ Render ================================
}); // ================================ Effect ================================
/** We need told outside that some list not rendered */
useLayoutEffect(function () {
var renderList = mergedData.slice(start, end);
onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(renderList, mergedData);
}, [start, end, mergedData]); // ================================ Render ================================
var listChildren = useChildren(mergedData, start, end, setInstanceRef, children, sharedConfig);

@@ -308,0 +316,0 @@ var componentStyle = null;

@@ -30,2 +30,4 @@ import * as React from 'react';

onScroll?: React.UIEventHandler<HTMLElement>;
/** Trigger when render list item changed */
onVisibleChange?: (visibleList: T[], fullList: T[]) => void;
}

@@ -32,0 +34,0 @@ export declare function RawList<T>(props: ListProps<T>, ref: React.Ref<ListRef>): JSX.Element;

@@ -33,3 +33,3 @@ "use strict";

var _excluded = ["prefixCls", "className", "height", "itemHeight", "fullHeight", "style", "data", "children", "itemKey", "virtual", "component", "onScroll"];
var _excluded = ["prefixCls", "className", "height", "itemHeight", "fullHeight", "style", "data", "children", "itemKey", "virtual", "component", "onScroll", "onVisibleChange"];

@@ -88,2 +88,3 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

onScroll = props.onScroll,
onVisibleChange = props.onVisibleChange,
restProps = _objectWithoutProperties(props, _excluded); // ================================= MISC =================================

@@ -303,3 +304,3 @@

});
React.useLayoutEffect(function () {
(0, React.useLayoutEffect)(function () {
// Firefox only

@@ -331,4 +332,11 @@ function onMozMousePixelScroll(e) {

};
}); // ================================ Render ================================
}); // ================================ Effect ================================
/** We need told outside that some list not rendered */
(0, React.useLayoutEffect)(function () {
var renderList = mergedData.slice(start, end);
onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(renderList, mergedData);
}, [start, end, mergedData]); // ================================ Render ================================
var listChildren = (0, _useChildren.default)(mergedData, start, end, setInstanceRef, children, sharedConfig);

@@ -335,0 +343,0 @@ var componentStyle = null;

{
"name": "rc-virtual-list",
"version": "3.3.0",
"version": "3.4.0",
"description": "React Virtual List Component",

@@ -5,0 +5,0 @@ "engines": {

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc