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

rc-slider

Package Overview
Dependencies
Maintainers
9
Versions
188
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-slider - npm Package Compare versions

Comparing version 11.1.1 to 11.1.2

24

es/hooks/useDrag.js

@@ -54,17 +54,13 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";

// Perf: Only update state when value changed
if (cacheValues.some(function (val, i) {
return val !== nextValues[i];
}) || deleteMark) {
if (nextValue !== undefined) {
setDraggingValue(nextValue);
}
setCacheValues(nextValues);
var changeValues = nextValues;
if (deleteMark) {
changeValues = nextValues.filter(function (_, i) {
return i !== draggingIndex;
});
}
triggerChange(changeValues);
if (nextValue !== undefined) {
setDraggingValue(nextValue);
}
setCacheValues(nextValues);
var changeValues = nextValues;
if (deleteMark) {
changeValues = nextValues.filter(function (_, i) {
return i !== draggingIndex;
});
}
triggerChange(changeValues);
};

@@ -71,0 +67,0 @@ var updateCacheValue = useEvent(function (valueIndex, offsetPercent, deleteMark) {

@@ -64,17 +64,13 @@ "use strict";

// Perf: Only update state when value changed
if (cacheValues.some(function (val, i) {
return val !== nextValues[i];
}) || deleteMark) {
if (nextValue !== undefined) {
setDraggingValue(nextValue);
}
setCacheValues(nextValues);
var changeValues = nextValues;
if (deleteMark) {
changeValues = nextValues.filter(function (_, i) {
return i !== draggingIndex;
});
}
triggerChange(changeValues);
if (nextValue !== undefined) {
setDraggingValue(nextValue);
}
setCacheValues(nextValues);
var changeValues = nextValues;
if (deleteMark) {
changeValues = nextValues.filter(function (_, i) {
return i !== draggingIndex;
});
}
triggerChange(changeValues);
};

@@ -81,0 +77,0 @@ var updateCacheValue = (0, _rcUtil.useEvent)(function (valueIndex, offsetPercent, deleteMark) {

{
"name": "rc-slider",
"version": "11.1.1",
"version": "11.1.2",
"description": "Slider UI component for React",

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

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