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

Number slider is broken for the number. #2161

Closed
ievgennaida opened this issue Dec 7, 2020 · 3 comments · Fixed by #3297
Closed

Number slider is broken for the number. #2161

ievgennaida opened this issue Dec 7, 2020 · 3 comments · Fixed by #3297
Labels
bug material-ui material-ui related theme issue

Comments

@ievgennaida
Copy link

ievgennaida commented Dec 7, 2020

Prerequisites

  1. Open numbers example in chrome.
  2. Select material UI style.
  3. Selected Number Range:

https://rjsf-team.github.io/react-jsonschema-form/

  1. See that drag not working with the material UI.

Expected behavior

drag for the range slider should work.

@jacqueswho jacqueswho added bug material-ui material-ui related theme issue labels Apr 11, 2022
@ps1x
Copy link

ps1x commented Apr 20, 2022

As a temporary fix one could use something like this:

function CustomRangeFix(props) {
  const { value, onChange } = props
  return (
    <Slider
      aria-label="Volume"
      value={value}
      valueLabelDisplay="auto"
      onChange={(e, b) => onChange(b)}
    />
  )
}

const widgets = {
  range: CustomRangeFix,
}

Then use react component with widgets props:

<Form widgets={widgets} .... />

@OneAirOne
Copy link

Hello,
I used the solution of @ps1x by using a custom widget for the slider.
I would like to know if it will be solved in the further Release ?
Thank's in advance

JonCatmull added a commit to JonCatmull/react-jsonschema-form that referenced this issue Dec 16, 2022
@JonCatmull
Copy link
Contributor

I have added a PR to fix this: #3297

JonCatmull added a commit to JonCatmull/react-jsonschema-form that referenced this issue Dec 19, 2022
heath-freenome added a commit that referenced this issue Dec 21, 2022
* fix(material-ui): fix RangeWidget onChange handler #2161

* fix(mui): fix RangeWidget onChange handler #2161

Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
shijistar pushed a commit to shijistar/react-jsonschema-form that referenced this issue Jun 8, 2023
…sf-team#3297)

* fix(material-ui): fix RangeWidget onChange handler rjsf-team#2161

* fix(mui): fix RangeWidget onChange handler rjsf-team#2161

Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
shijistar pushed a commit to shijistar/react-jsonschema-form that referenced this issue Jun 8, 2023
…sf-team#3297)

* fix(material-ui): fix RangeWidget onChange handler rjsf-team#2161

* fix(mui): fix RangeWidget onChange handler rjsf-team#2161

Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug material-ui material-ui related theme issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants