Skip to content

Commit

Permalink
Fix #79 onComplete broken
Browse files Browse the repository at this point in the history
  • Loading branch information
ryancat committed Jun 17, 2023
1 parent a31b5e4 commit c63586d
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 c63586d

Please sign in to comment.