From 131e9115e1a0c07e64e965e4fa42d52489658362 Mon Sep 17 00:00:00 2001 From: melloware Date: Wed, 18 Oct 2023 14:03:46 -0400 Subject: [PATCH] Fix #5111: Slider fix NaN on bottom CSS --- components/lib/slider/Slider.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/lib/slider/Slider.js b/components/lib/slider/Slider.js index b773ef42cb..31f74c729b 100644 --- a/components/lib/slider/Slider.js +++ b/components/lib/slider/Slider.js @@ -198,8 +198,8 @@ export const Slider = React.memo( bottomValue = ObjectUtils.isEmpty(bottomValue) ? null : bottomValue; const style = { transition: dragging.current ? 'none' : null, - left: leftValue && leftValue + '%', - bottom: bottomValue && bottomValue + '%' + left: leftValue != null && leftValue + '%', + bottom: bottomValue != null && bottomValue + '%' }; const handleProps = mergeProps( @@ -213,7 +213,7 @@ export const Slider = React.memo( onKeyDown: (event) => onKeyDown(event, index), 'aria-valuemin': props.min, 'aria-valuemax': props.max, - 'aria-valuenow': leftValue || bottomValue, + 'aria-valuenow': leftValue || bottomValue || 0, 'aria-orientation': props.orientation, ...ariaProps },