Skip to content

ListBox with multiple attribute formatting array values with indexes #3751

@maxtull

Description

@maxtull

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

v2.2.4

What browser are you using?

Chrome

Describe your issue

Listboxes with the multiple attribute when used in a form create hidden fields for each array item. The only problem here is that these fields aren't named in a way where they can be easily parsed as true HTML arrays.

The hidden fields should all be named the same when using an array value instead of being indexed. This follows the FormData standard for true HTML arrays.

Further ref: #2901

Cheers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions