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 unexpected behavior #2855

Closed
mthongkerd opened this issue Nov 1, 2022 · 4 comments
Closed

Slider step unexpected behavior #2855

mthongkerd opened this issue Nov 1, 2022 · 4 comments
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@mthongkerd
Copy link

mthongkerd commented Nov 1, 2022

What package has an issue

@mantine/core

Describe the bug

When using Slider component setting the min value to an odd number and setting step value to an even number, the step is not behaving correctly (goes to even number). The dragging also seem to be lagging behind.

This is the same when the max value is set to an odd number when the step value is an even number.

What version of @mantine/hooks page do you have in package.json?

5.6.3

If possible, please include a link to a codesandbox with the reproduced problem

https://codesandbox.io/s/mantine-slider-step-problem-ophjnt?file=/src/App.js

Do you know how to fix the issue

No response

Are you willing to participate in fixing this issue and create a pull request with the fix

No response

Possible fix

No response

@mthongkerd mthongkerd changed the title Slider step unexpected behavior Slider step unexpected behavior Nov 1, 2022
@wes337
Copy link
Contributor

wes337 commented Nov 2, 2022

I believe this will be fixed by #2839.

@rtivital that PR has been open for some time, and it will fix a couple issues if merged.

@rtivital rtivital added the Fixed patch Completed issues that will be published with next patch (1.0.X) label Nov 2, 2022
@mthongkerd
Copy link
Author

@wes337 @rtivital Updated to 5.6.4 but the problems are still there.

See: https://codesandbox.io/s/mantine-slider-step-problem-5-6-4-l0zmlx?file=/src/App.js

@rtivital rtivital removed the Fixed patch Completed issues that will be published with next patch (1.0.X) label Nov 2, 2022
@wes337
Copy link
Contributor

wes337 commented Nov 2, 2022

@wes337 @rtivital Updated to 5.6.4 but the problems are still there.

See: https://codesandbox.io/s/mantine-slider-step-problem-5-6-4-l0zmlx?file=/src/App.js

Yeah, you’re right. I will take another look into this

@rtivital rtivital added the Fixed patch Completed issues that will be published with next patch (1.0.X) label Nov 12, 2022
@rtivital
Copy link
Member

Fixed in 5.7.2. First case was fixed, second case should work fine – user should be able to reach the end of the slider independent of the step prop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)
Projects
None yet
Development

No branches or pull requests

3 participants