Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not ignore 0 value prop #692

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

vonovak
Copy link
Contributor

@vonovak vonovak commented Mar 26, 2025

Summary:

currentValue is used when rendering StepMarker and currently it doesn't seem to treat 0 correctly.

Test Plan:

  const renderStepMarker = React.useCallback(({ stepMarked, currentValue }: MarkerProps) => {
    return stepMarked ? <Text>{currentValue}</Text> : null;
  }, []);

<Slider
  minimumValue={-3}
  value={0}
  maximumValue={5}
  onValueChange={setValue}
  StepMarker={renderStepMarker}
/>
fixed

simulator_screenshot_B9622E5F-8FDB-4697-82E2-819E5D318160

previous

simulator_screenshot_61C1DFA5-D7A3-46B6-862A-4DADFAB6FCB3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant