Skip to content

Commit

Permalink
Merge pull request #86 from ryancat/master
Browse files Browse the repository at this point in the history
Fix #79 onComplete broken
  • Loading branch information
Aswin authored Jun 24, 2023
2 parents 8cdace7 + c63586d commit adb233b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ const VerticalSlider: React.FC<SliderProps> = ({
ballIndicatorTextColor = '#000000',
showBackgroundShadow = true,
shadowProps = {},
renderIndicator = null,
renderIndicator,
disabled = false,
onChange = () => {},
onComplete = () => {},
value: currentValue = 0,
}) => {
}: SliderProps) => {
const {
shadowOffsetWidth = 0,
shadowOffsetHeight = 1,
Expand Down Expand Up @@ -152,7 +152,9 @@ const VerticalSlider: React.FC<SliderProps> = ({
if (disabled) {
return;
}
onChange(_calculateValue(gestureState));
const newValue = _calculateValue(gestureState);
onChange(newValue);
onComplete(newValue);
};
const onPanResponderTerminate = (
_event: GestureResponderEvent,
Expand Down

0 comments on commit adb233b

Please sign in to comment.