Skip to content

[bug]: "Select" component in Field example displays placeholder as selectable option #11486

Description

@volatileConst

Describe the bug

const items = [ { label: "Choose department", value: null }, <----- here { label: "Engineering", value: "engineering" }, { label: "Design", value: "design" }, { label: "Marketing", value: "marketing" }, { label: "Sales", value: "sales" }, { label: "Customer Support", value: "support" }, { label: "Human Resources", value: "hr" }, { label: "Finance", value: "finance" }, { label: "Operations", value: "operations" }, ]

instead, the
{ label: "Choose department", value: null },
should be moved to

<SelectValue placeholder="Choose department"/>

reason: placeholders should not be a selectable option

plan: submit a change

Affected component/components

FieldSelect

How to reproduce

  1. Read https://ui.shadcn.com/docs/components/base/field#select

Codesandbox/StackBlitz link

No response

Logs

System Info

doesn't matter

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions