Skip to content

RJSF no longer recognizes enumNames #5164

Description

@juanhoil

Prerequisites

What theme are you using?

other

Version

6.x

Current Behavior

Actual behavior

enumNames is ignored, and the UI displays the raw values from enum instead.

Question

Is this an intentional change? If so, what is the recommended approach for providing display labels for enum values while keeping a pure JSON Schema definition?

Expected Behavior

Description

It seems that RJSF is no longer fully based on JSON Schema, or at least it no longer recognizes some schema properties that were previously supported.

For example, enumNames is ignored and has no effect when rendering enum fields.

Example
{
"type": "string",
"enum": ["A", "B"],
"enumNames": ["Option A", "Option B"]
}
Expected behavior

The form should display:

Option A
Option B

while still submitting the values:

A
B

Steps To Reproduce

No response

Environment

- OS:
- Node:
- npm:

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions