Skip to content

Commit

Permalink
Fix primefaces#4680: Slider onSlideEnd have correct new value
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Jul 24, 2023
1 parent d808f89 commit 7f8b4cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/lib/slider/Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ export const Slider = React.memo(
if (dragging.current) {
dragging.current = false;

props.onSlideEnd && props.onSlideEnd({ originalEvent: event, value: props.value });
const newValue = setValue(event);

props.onSlideEnd && props.onSlideEnd({ originalEvent: event, value: newValue });

unbindDocumentMouseMoveListener();
unbindDocumentMouseUpListener();
Expand Down

0 comments on commit 7f8b4cb

Please sign in to comment.