[base-ui][material-ui] Uncontrolled Switch component do not fully reset when inside a <form> with a reset button #40245
Labels
component: switch
This is the name of the generic UI component, not the React module!
enhancement
This is not a bug, nor a new feature
package: base-ui
Specific to @mui/base
package: material-ui
Specific to @mui/material
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example without using state: https://codesandbox.io/p/sandbox/eager-rgb-m43d9q
Link to live example using state: https://codesandbox.io/p/sandbox/focused-hellman-z83g9c
Current behavior 😯
When using Switch component, Pressing the reset button in a form does not revert value of the Switch to its default value.
If I use Switch with state then it will work properly.
Expected behavior 🤔
Changes in the value of the Switch will get reset while clicking on the reset button when we are not using the state (for the first codesandbox).
Context 🔦
No response
Your environment 🌎
npx @mui/envinfo
The text was updated successfully, but these errors were encountered: