Skip to content

Required enum field still renders an empty option #5027

@fourteenmeister

Description

@fourteenmeister

Prerequisites

What theme are you using?

core

Version

6.4.1

Current Behavior

Bug

I understand that showing an empty option for enum/select fields may be intentional in the general case, and the docs describe empty-value behavior for selects. But for a required enum field this looks incorrect, because the schema does not allow an empty value and the UI still shows a blank selectable item.

Actual

An empty first option is rendered even though the field is required and the enum contains only non-empty values.

Expected Behavior

A required enum field should not render an empty option unless that empty option is explicitly defined by schema or uiSchema.

Steps To Reproduce

Sandbox reproduction

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions