Skip to content

Always render hidden inputs #2977

Closed
@hauptrolle

Description

@hauptrolle

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

v2.0.0-alpha.4

What browser are you using?

Chrome

Describe your issue

With the current behaviour of the switch & checkbox component, the hidden checkbox is just rendered when the checkbox is checked.

This makes it pretty hard to implement these controls within a form framework like conform or submitting a form onChange (the input is visible after the form is submitted).

Would it be possible to always render the hidden checkbox input?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions