Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

fix(Slider): Set min and max of onAccessibilityAction to the correct values #23

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/slider/src/useSliderThumb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down