When using <Switch type="submit"> clicking the button changes the current setting but does not submit the form. In the reproduction above the form submits with a normal button, and with a button that has the role="switch", but the <Switch> component does not.
What package within Headless UI are you using?
@headlessui/react
What version of that package are you using?
v2.1.1
What browser are you using?
Arc (Chrome)
Reproduction URL CodeSandbox:
Describe your issue
When using
<Switch type="submit">
clicking the button changes the current setting but does not submit the form. In the reproduction above the form submits with a normal button, and with a button that has therole="switch"
, but the<Switch>
component does not.