Controller not working for Material UI slider component
See original GitHub issueDescribe the bug Controller component not working for Material UI slider component. When value is changed on the controller, an error occurs:
" Received NaN for the children
attribute. If this is expected, cast the value to a string."
To Reproduce Steps to reproduce the behavior:
- Go to [https://codesandbox.io/s/react-hook-form-controller-vj1o0]
- Set react hooks version to 6.0.3 or higher
- Scroll down to the slider
- Try to change the value of the slider
- See error in console
Codesandbox link (Required) https://codesandbox.io/s/react-hook-form-controller-vj1o0
make sure you change reat hook version
Expected behavior The value should change properly.
Desktop (please complete the following information):
- Ubuntu 18.0.2
- Chrome
- Version 83
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Material-UI Slider not drag when loading component from a ...
I think I am close and the values all get set as they should but the slider will not slide, you have to...
Read more >React Slider component - Material UI - MUI
Sliders allow users to make selections from a range of values. ... The component handles most of the work necessary to make it...
Read more >Using Material UI with React Hook Form - LogRocket Blog
As a result, when we try to use the Slider component inside a Controller component from React Hook Form, it throws error.
Read more >React Hook Form Controller v7 Examples (MaterialUI, AntD ...
React Hook Form has a Controller component that allows you to use your third-party UI library components with its hook and custom register....
Read more >Slider - Angular Material
UI component infrastructure and Material Design components for mobile and desktop Angular web applications.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This CSB doesn’t have examples with Material UI, and isn’t very relevant… I’m trying to get this working with Material UI’s slider…
You were correct, I saw the AntD example on first glace. My apologies to you @bluebill1049 .