From a94c3a8cf3da431f961cebd469f64c1cf89f4141 Mon Sep 17 00:00:00 2001 From: grgr-dkrk <40130327+grgr-dkrk@users.noreply.github.com> Date: Sun, 17 Oct 2021 21:51:48 +0900 Subject: [PATCH] fix(Slider): set min and max of `onAccessibilityAction` to the correct values --- packages/slider/src/useSliderThumb.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/slider/src/useSliderThumb.ts b/packages/slider/src/useSliderThumb.ts index e6eab9e..cddcc19 100644 --- a/packages/slider/src/useSliderThumb.ts +++ b/packages/slider/src/useSliderThumb.ts @@ -82,8 +82,8 @@ export function useSliderThumb( state.setThumbEditable(index, !isDisabled); const onAccessibilityAction = (event: any) => { - const max = state.getThumbMinValue(index); - const min = state.getThumbMaxValue(index); + const max = state.getThumbMaxValue(index); + const min = state.getThumbMinValue(index); const value = state.getThumbValue(index); const incrementValue = Math.min(value + state.step ?? 1, max);