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.10.3 to 3.10.4

13

es/ScrollBar.js

@@ -107,2 +107,7 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";

}, []);
// Pass to effect
var enableScrollRangeRef = React.useRef();
enableScrollRangeRef.current = enableScrollRange;
var enableOffsetRangeRef = React.useRef();
enableOffsetRangeRef.current = enableOffsetRange;
React.useEffect(function () {

@@ -125,6 +130,8 @@ if (dragging) {

}
var ptg = enableOffsetRange ? newTop / enableOffsetRange : 0;
var newScrollTop = Math.ceil(ptg * enableScrollRange);
var tmpEnableScrollRange = enableScrollRangeRef.current;
var tmpEnableOffsetRange = enableOffsetRangeRef.current;
var ptg = tmpEnableOffsetRange ? newTop / tmpEnableOffsetRange : 0;
var newScrollTop = Math.ceil(ptg * tmpEnableScrollRange);
newScrollTop = Math.max(newScrollTop, 0);
newScrollTop = Math.min(newScrollTop, enableScrollRange);
newScrollTop = Math.min(newScrollTop, tmpEnableScrollRange);
moveRafId = raf(function () {

@@ -131,0 +138,0 @@ onScroll(newScrollTop, horizontal);

@@ -115,2 +115,7 @@ "use strict";

}, []);
// Pass to effect
var enableScrollRangeRef = React.useRef();
enableScrollRangeRef.current = enableScrollRange;
var enableOffsetRangeRef = React.useRef();
enableOffsetRangeRef.current = enableOffsetRange;
React.useEffect(function () {

@@ -133,6 +138,8 @@ if (dragging) {

}
var ptg = enableOffsetRange ? newTop / enableOffsetRange : 0;
var newScrollTop = Math.ceil(ptg * enableScrollRange);
var tmpEnableScrollRange = enableScrollRangeRef.current;
var tmpEnableOffsetRange = enableOffsetRangeRef.current;
var ptg = tmpEnableOffsetRange ? newTop / tmpEnableOffsetRange : 0;
var newScrollTop = Math.ceil(ptg * tmpEnableScrollRange);
newScrollTop = Math.max(newScrollTop, 0);
newScrollTop = Math.min(newScrollTop, enableScrollRange);
newScrollTop = Math.min(newScrollTop, tmpEnableScrollRange);
moveRafId = (0, _raf.default)(function () {

@@ -139,0 +146,0 @@ onScroll(newScrollTop, horizontal);

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