Skip to content

<el-select> doesn't respect "required" when in a form #1728

@Tonksthebear

Description

@Tonksthebear

What component (if applicable)
https://tailwindcss.com/plus/ui-blocks/documentation/select#component-api

Describe the bug
The description of the select component states that is a full replacement for the native <select> element. However, I'm noticing a couple native features that I don't think are currently implemented. From what I know about custom elements, I think they're supposed to be able to hook into browser form validations. I'm not positive though.

To Reproduce
https://play.tailwindcss.com/ZxS9UuC4Xe

Expected behavior
<el-select> should respect form controls, such as "required" so that the browser catches a nil value before attempting to submit the form. In the playground, I put two forms, both with a required select. One with <el-select> and the other with <select>.

Screenshots
The playground should provide all that's needed

Browser/Device (if applicable)
macOS Safari

Additional context
<el-select> also doesn't respect "multiple". The minified source was extremely difficult to read but if I'm not mistaken, does not iterate of multiple selected <el-options>, so this leads me to believe it was intentional to not support multi-select.

Metadata

Metadata

Assignees

No one assigned

    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