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 with marks and step=null gives NaN when using arrow keys off the end #45049

Open
joshkel opened this issue Jan 17, 2025 · 0 comments · May be fixed by #45050
Open

Slider with marks and step=null gives NaN when using arrow keys off the end #45049

joshkel opened this issue Jan 17, 2025 · 0 comments · May be fixed by #45050
Labels
status: waiting for maintainer These issues haven't been looked at yet by a maintainer

Comments

@joshkel
Copy link
Contributor

joshkel commented Jan 17, 2025

Steps to reproduce

Steps:

  1. Open this link to live example: https://stackblitz.com/edit/react-wipr3jaf?file=Demo.tsx
  2. Click the slider at 20°C
  3. Press the right arrow key a few times.

Current behavior

Trying to go off the right edge sets the value to NaN.

Expected behavior

Stop at the right edge.

Context

No response

Your environment

npx @mui/envinfo

  System:
    OS: macOS 15.1.1
  Binaries:
    Node: 22.12.0 - ~/.nvm/versions/node/v22.12.0/bin/node
    npm: 10.9.0 - ~/.nvm/versions/node/v22.12.0/bin/npm
    pnpm: Not Found
  Browsers:
    Chrome: 131.0.6778.265
    Edge: 131.0.2903.147
    Safari: 18.1.1
  npmPackages:
    @emotion/react:  11.14.0 
    @emotion/styled:  11.14.0 
    @mui/base:  5.0.0-beta.68 
    @mui/core-downloads-tracker:  6.4.0 
    @mui/icons-material:  6.4.0 
    @mui/lab:  6.0.0-beta.23 
    @mui/material:  6.4.0 
    @mui/private-theming:  6.4.0 
    @mui/styled-engine:  6.4.0 
    @mui/system:  6.4.0 
    @mui/types:  7.2.21 
    @mui/utils:  6.4.0 
    @mui/x-date-pickers:  7.23.6 
    @mui/x-internals:  7.23.6 
    @mui/x-tree-view:  7.23.6 
    @types/react: ^18.3.18 => 18.3.18 
    react: ^18.3.1 => 18.3.1 
    react-dom: ^18.3.1 => 18.3.1 
    typescript: ^5.7.3 => 5.7.3 

Search keywords: slider nan

@joshkel joshkel added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jan 17, 2025
joshkel added a commit to joshkel/material-ui that referenced this issue Jan 17, 2025
joshkel added a commit to joshkel/material-ui that referenced this issue Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting for maintainer These issues haven't been looked at yet by a maintainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant