rc-slider
Advanced tools
Comparing version 11.1.1 to 11.1.2
@@ -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": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
167426
3754