Skip to content

Commit fd490b4

Browse files
committed
Fix sticky value
1 parent 724bd59 commit fd490b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react/slider/src/Slider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ const Slider = React.forwardRef((props, forwardedRef) => {
117117
const nextValues = getNextSortedValues(prevValues, nextValue, atIndex);
118118
if (hasMinStepsBetweenValues(nextValues, minStepsBetweenThumbs * step)) {
119119
valueIndexToChangeRef.current = nextValues.indexOf(nextValue);
120-
return nextValues[atIndex] !== prevValues[atIndex] ? nextValues : prevValues;
120+
return String(nextValues) === String(prevValues) ? prevValues : nextValues;
121121
} else {
122122
return prevValues;
123123
}

0 commit comments

Comments
 (0)