Skip to content

Commit

Permalink
Fix primefaces#5111: Slider fix NaN on bottom CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Oct 18, 2023
1 parent 0eadbe0 commit 131e911
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/lib/slider/Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
},
Expand Down

0 comments on commit 131e911

Please sign in to comment.