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

[Slider] step behavior wrong in cases where min not zero #585

Closed
strickc opened this issue Oct 11, 2017 · 1 comment
Closed

[Slider] step behavior wrong in cases where min not zero #585

strickc opened this issue Oct 11, 2017 · 1 comment
Labels
Milestone

Comments

@strickc
Copy link
Contributor

strickc commented Oct 11, 2017

Description

When using a slider with a step defined the increments are miscalculated and do not match the value provided by step.

Images/Screenshots

Image of Slider Error
The incorrect bottom slider cannot be set to 2.5 or 2.75, despite those being evenly divisible by the 0.25 step starting at 0.5.

Link to a gist or code sample where the issue can be reproduced

Issue is displayed on the forked codepen template:
https://codepen.io/strickc/pen/VMdOLX

Version

  • React - 15
  • React-MD - 1.2
  • Browser - Chrome v61

I'd be interested in providing a fix for this bug if a pull request is welcome.

Edited to correct my confusion between the step and discreteTicks properties.

@mlaursen
Copy link
Owner

mlaursen commented Oct 11, 2017

PRs are always welcome if the contributing guidelines are followed!

I have been meaning to consolidate them..

@strickc strickc changed the title [Slider] discreteTicks wrong in cases where min not zero [Slider] step behavior wrong in cases where min not zero Oct 11, 2017
@mlaursen mlaursen added the bug label Oct 11, 2017
mlaursen added a commit that referenced this issue Oct 13, 2017
[Slider] Fix value miscalculation when min and step are defined  (fixes #585)
@mlaursen mlaursen added this to the v1.2.3 milestone Oct 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants