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

Issue with left handle of RangeSlider when min prop is set to a negative value #2897

Closed
snehilvj opened this issue Nov 6, 2022 · 7 comments
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@snehilvj
Copy link
Contributor

snehilvj commented Nov 6, 2022

What package has an issue

@mantine/core

Describe the bug

Left handle of RangeSlider is not draggable if min prop is set to a negative value.
rangeslider-mantine

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

5.7.1

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

https://codesandbox.io/s/clever-dhawan-ly7qy0

Do you know how to fix the issue

No

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

Yes

Possible fix

No response

@rtivital
Copy link
Member

rtivital commented Nov 6, 2022

@wes337 was this caused by your changes? Maybe we should just rollback your PRs?

@wes337
Copy link
Contributor

wes337 commented Nov 7, 2022

@wes337 was this caused by your changes? Maybe we should just rollback your PRs?

I have tried reverting any change I made to the Slider, but it does not fix this issue.

You can see for yourself by changing the code of the get-change-value.ts file back to the original from this PR: https://github.com/mantinedev/mantine/pull/2656/files. Reverting those changes to the getChangeValue function is the same as rolling back my PRs (the other changes were only Storybook stories).

@wes337
Copy link
Contributor

wes337 commented Nov 7, 2022

I have also tried rolling back Mantine to as early as 5.5.0 and the problem persists.

@snehilvj , your issue can be fixed by adding the minRange prop: https://codesandbox.io/s/confident-lena-821u5t?file=/src/App.tsx

@rtivital
Copy link
Member

rtivital commented Nov 7, 2022

Okay, I'll have a look then

@wes337
Copy link
Contributor

wes337 commented Nov 7, 2022

I was able to fix this issue by making some changes to the setRangedValue function in the RangeSlider component:

image

@snehilvj
Copy link
Contributor Author

snehilvj commented Nov 7, 2022

@snehilvj , your issue can be fixed by adding the minRange prop: https://codesandbox.io/s/confident-lena-821u5t?file=/src/App.tsx

I actually maintain a library based on Mantine which lets users use Mantine in python. So I'll have to wait for the actual resolution.

@rtivital rtivital added Fixed patch Completed issues that will be published with next patch (1.0.X) and removed review required labels Nov 9, 2022
@rtivital
Copy link
Member

Fixed in 5.7.2

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