Skip to content

fix: do not ignore 0 value prop #692

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

Merged
merged 1 commit into from
Apr 11, 2025
Merged

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

@BartoszKlonowski BartoszKlonowski self-requested a review April 11, 2025 12:27
Copy link
Member

@BartoszKlonowski BartoszKlonowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I see the thing. Thank you for making a PR with it!

@BartoszKlonowski BartoszKlonowski merged commit 4446210 into callstack:main Apr 11, 2025
9 checks passed
@vonovak vonovak deleted the patch-1 branch April 11, 2025 12:32
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.

2 participants