Skip to content

Slider Amount exceeds maximum value when scrolling out of the boundries #104

Open
@itsnyx

Description

@itsnyx

Hello,

i have a slider with 50% of width and when i scroll the slider to maximum position and keep scrolling to right side after the slider reaches the 100% the slider component shows 100% but the actual value still increases and will be bigger than 100

also the same thing happens for 0 if you have space in mobile touch screen and keep scrolling to left the slider progress value will be negative !

Image

is there a way to make sure slider will not change the progress value more than the min and max amount ?

  const progress = useSharedValue(50);
  const min = useSharedValue(0);
  const max = useSharedValue(100);
  console.log('progress : ', progress.value);
  return (
    <>
      <Label label={`${progress.value}`} />
      <Slider
        progress={progress}
        minimumValue={min}
        maximumValue={max}
        style={{
          width: '50%',
        }}
      />

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions