Skip to content

Better handling of checkbox edge cases #51

Open
@brophdawg11

Description

@brophdawg11

Related to some of the comments in #46

Checkboxes pose some interesting challenges compared to other inputs:

  • They're sort of inherently multiple
  • I tend to view them as a different UI for <select multiple>
  • While you can assign different attributes to each individual checkbox, it makes no sense to me and they should be validated as a group. Either you have to check at least one box or you don't.

So right now they use a single useValidatedInput and you are expected to spread getInputAttrs onto each checkbox and provide a value.

However, right now they are not re-checked in the no-js submission case since we only fill defaultValue at the moment and we would need to set checked instead.

Also think about whether checkboxes should disallow or require multiple in the definition?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions