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

rc-virtual-list

Package Overview
Dependencies
Maintainers
2
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.5.0 to 3.5.1

2

es/List.d.ts
import * as React from 'react';
import type { InnerProps } from './Filler';
import type { ScrollBarDirectionType } from './ScrollBar';
import type { RenderFunc } from './interface';

@@ -30,2 +31,3 @@ export type ScrollAlign = 'top' | 'bottom' | 'auto';

virtual?: boolean;
direction?: ScrollBarDirectionType;
onScroll?: React.UIEventHandler<HTMLElement>;

@@ -32,0 +34,0 @@ /** Trigger when render list item changed */

4

es/List.js

@@ -6,3 +6,3 @@ import _extends from "@babel/runtime/helpers/esm/extends";

import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
var _excluded = ["prefixCls", "className", "height", "itemHeight", "fullHeight", "style", "data", "children", "itemKey", "virtual", "component", "onScroll", "onVisibleChange", "innerProps"];
var _excluded = ["prefixCls", "className", "height", "itemHeight", "fullHeight", "style", "data", "children", "itemKey", "virtual", "direction", "component", "onScroll", "onVisibleChange", "innerProps"];
import * as React from 'react';

@@ -39,2 +39,3 @@ import { useRef, useState } from 'react';

virtual = props.virtual,
direction = props.direction,
_props$component = props.component,

@@ -291,2 +292,3 @@ Component = _props$component === void 0 ? 'div' : _props$component,

count: mergedData.length,
direction: direction,
onScroll: onScrollBar,

@@ -293,0 +295,0 @@ onStartMove: function onStartMove() {

import * as React from 'react';
export type ScrollBarDirectionType = 'ltr' | 'rtl';
export interface ScrollBarProps {

@@ -8,2 +9,3 @@ prefixCls: string;

count: number;
direction?: ScrollBarDirectionType;
onScroll: (scrollTop: number) => void;

@@ -10,0 +12,0 @@ onStartMove: () => void;

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

import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";

@@ -177,3 +178,5 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";

visible = _this$state2.visible;
var prefixCls = this.props.prefixCls;
var _this$props4 = this.props,
prefixCls = _this$props4.prefixCls,
direction = _this$props4.direction;
var spinHeight = this.getSpinHeight();

@@ -183,13 +186,18 @@ var top = this.getTop();

var mergedVisible = canScroll && visible;
var scrollBarDirection = direction === 'rtl' ? {
left: 0
} : {
right: 0
};
return /*#__PURE__*/React.createElement("div", {
ref: this.scrollbarRef,
className: classNames("".concat(prefixCls, "-scrollbar"), _defineProperty({}, "".concat(prefixCls, "-scrollbar-show"), canScroll)),
style: {
style: _objectSpread(_objectSpread({
width: 8,
top: 0,
bottom: 0,
right: 0,
bottom: 0
}, scrollBarDirection), {}, {
position: 'absolute',
display: mergedVisible ? null : 'none'
},
}),
onMouseDown: this.onContainerMouseDown,

@@ -196,0 +204,0 @@ onMouseMove: this.delayHidden

import * as React from 'react';
import type { InnerProps } from './Filler';
import type { ScrollBarDirectionType } from './ScrollBar';
import type { RenderFunc } from './interface';

@@ -30,2 +31,3 @@ export type ScrollAlign = 'top' | 'bottom' | 'auto';

virtual?: boolean;
direction?: ScrollBarDirectionType;
onScroll?: React.UIEventHandler<HTMLElement>;

@@ -32,0 +34,0 @@ /** Trigger when render list item changed */

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

var _useLayoutEffect = _interopRequireDefault(require("rc-util/lib/hooks/useLayoutEffect"));
var _excluded = ["prefixCls", "className", "height", "itemHeight", "fullHeight", "style", "data", "children", "itemKey", "virtual", "component", "onScroll", "onVisibleChange", "innerProps"];
var _excluded = ["prefixCls", "className", "height", "itemHeight", "fullHeight", "style", "data", "children", "itemKey", "virtual", "direction", "component", "onScroll", "onVisibleChange", "innerProps"];
var EMPTY_DATA = [];

@@ -47,2 +47,3 @@ var ScrollStyle = {

virtual = props.virtual,
direction = props.direction,
_props$component = props.component,

@@ -299,2 +300,3 @@ Component = _props$component === void 0 ? 'div' : _props$component,

count: mergedData.length,
direction: direction,
onScroll: onScrollBar,

@@ -301,0 +303,0 @@ onStartMove: function onStartMove() {

import * as React from 'react';
export type ScrollBarDirectionType = 'ltr' | 'rtl';
export interface ScrollBarProps {

@@ -8,2 +9,3 @@ prefixCls: string;

count: number;
direction?: ScrollBarDirectionType;
onScroll: (scrollTop: number) => void;

@@ -10,0 +12,0 @@ onStartMove: () => void;

@@ -9,2 +9,3 @@ "use strict";

exports.default = void 0;
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));

@@ -186,3 +187,5 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));

visible = _this$state2.visible;
var prefixCls = this.props.prefixCls;
var _this$props4 = this.props,
prefixCls = _this$props4.prefixCls,
direction = _this$props4.direction;
var spinHeight = this.getSpinHeight();

@@ -192,13 +195,18 @@ var top = this.getTop();

var mergedVisible = canScroll && visible;
var scrollBarDirection = direction === 'rtl' ? {
left: 0
} : {
right: 0
};
return /*#__PURE__*/React.createElement("div", {
ref: this.scrollbarRef,
className: (0, _classnames.default)("".concat(prefixCls, "-scrollbar"), (0, _defineProperty2.default)({}, "".concat(prefixCls, "-scrollbar-show"), canScroll)),
style: {
style: (0, _objectSpread2.default)((0, _objectSpread2.default)({
width: 8,
top: 0,
bottom: 0,
right: 0,
bottom: 0
}, scrollBarDirection), {}, {
position: 'absolute',
display: mergedVisible ? null : 'none'
},
}),
onMouseDown: this.onContainerMouseDown,

@@ -205,0 +213,0 @@ onMouseMove: this.delayHidden

{
"name": "rc-virtual-list",
"version": "3.5.0",
"version": "3.5.1",
"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