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] disableSwap prop is returning an incorrect value #32381

Closed
2 tasks done
totszwai opened this issue Apr 20, 2022 · 1 comment · Fixed by #32647
Closed
2 tasks done

[Slider] disableSwap prop is returning an incorrect value #32381

totszwai opened this issue Apr 20, 2022 · 1 comment · Fixed by #32647
Labels
bug 🐛 Something doesn't work component: slider This is the name of the generic UI component, not the React module!

Comments

@totszwai
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

Enable disableSwap, drag the first dot all the way pass the second dot. The return value is wrong and is not the actual values.
https://codesandbox.io/s/disableswap-broken-urlmbd?file=/demo.js

With the above sandbox, if you drag the 2nd dot all the way to the end of the slider area, the return value end up to be [60, 100] when is supposed to be [60, 60].

Expected behavior 🤔

Expected the return values to match what the Slider is presenting.

Steps to reproduce 🕹

Steps:

  1. https://codesandbox.io/s/disableswap-broken-urlmbd?file=/demo.js
  2. Drag the first dot over the second dot all the way to the end.
  3. Observe in the console of the incorrect values returned

Context 🔦

No response

Your environment 🌎

`npx @mui/envinfo`
npx @mui/envinfo

  System:
    OS: Linux 5.13 Ubuntu 21.10 21.10 (Impish Indri)
    CPU: (16) x64 Intel(R) Xeon(R) Silver 4108 CPU @ 1.80GHz
    Memory: 3.11 GB / 15.33 GB
    Container: Yes
    Shell: 5.1.8 - /bin/bash
  Binaries:
    Node: 14.19.1 - ~/.config/nvm/versions/node/v14.19.1/bin/node
    npm: 6.14.16 - ~/.config/nvm/versions/node/v14.19.1/bin/npm
  Managers:
    Apt: 2.3.9 - /usr/bin/apt
    Maven: 3.6.3 - /usr/bin/mvn
    pip2: 20.3.4 - ~/.local/bin/pip2
    pip3: 20.3.4 - /usr/bin/pip3
  Utilities:
    Make: 4.3 - /usr/bin/make
    GCC: 11.2.0 - /usr/bin/gcc
    Git: 2.32.0 - /usr/bin/git
  Virtualization:
    Docker: 20.10.7 - /usr/bin/docker
  IDEs:
    Nano: 5.6.1 - /usr/bin/nano
    VSCode: 1.66.2 - /home/eto/.vscode-server/bin/dfd34e8260c270da74b5c2d86d61aee4b6d56977/bin/remote-cli/code
    Vim: 8.2 - /usr/bin/vim
  Languages:
    Bash: 5.1.8 - /usr/bin/bash
    Java: 1.8.0_312 - /usr/bin/javac
    Perl: 5.32.1 - /usr/bin/perl
    Python: 2.7.18 - /usr/bin/python
    Python3: 3.9.7 - /usr/bin/python3
  Browsers:
    Chrome: 100.0.4896.75
    Chromium: 100.0.4896.127
    Firefox: 99.0
@totszwai totszwai added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Apr 20, 2022
@danilo-leal danilo-leal changed the title Slider disableSwap broken, returns incorrect value [Slider] disableSwap prop is returning an incorrect value Apr 20, 2022
@danilo-leal danilo-leal added the component: slider This is the name of the generic UI component, not the React module! label Apr 20, 2022
@michaldudak
Copy link
Member

Thanks for reporting this. It seems we have a bug here. Would you like to give fixing it a try and create a PR?

@michaldudak michaldudak added bug 🐛 Something doesn't work and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: slider This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants