Skip to content

ui:title from ui:definitions not applied to oneOf/anyOf dropdowns beyond first recursion level #4986

@adamrimon

Description

@adamrimon

Prerequisites

  • I have searched the existing issues
  • I understand that providing a SSCCE example is tremendously useful to the maintainers.
  • I have read the documentation

What theme are you using?

other

Version

6.4.1

Current Behavior

When using ui:definitions with ui:title on a recursive oneOf/anyOf schema, dropdown labels show the defined title at the first level but fall back to "Option N" at deeper levels. Other UI settings like ui:placeholder work at all depths.

Expected Behavior

Dropdown labels from ui:definitions should appear at all recursion depths.

Steps To Reproduce

  1. Define a recursive schema with oneOf: [{ type: 'null' }, { $ref: '#/definitions/node' }]
  2. Set 'ui:title': 'Node' in ui:definitions for #/definitions/node
  3. Add items at depth 2+
  4. Dropdown shows "Node" at depth 1 but "Option 2" at depth 2+

Anything else?

ui:definitions was introduced in #4947 and a recursion fix was added in #4967. The recursion fix enabled property-level UI at all depths, but dropdown labels were missed because MultiSchemaField reads them from the parent-level uiSchema.oneOf[i] before any child field resolves its own definition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageInitial label given, to be assigned correct labels and assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions