Skip to content

Inconsistent ui:title behavior #299

@markgreenburg

Description

@markgreenburg

Is your feature request related to a problem? Please describe.
Different fields accept different things for the ui:title uiSchema property.

Describe the solution you'd like

  • All fields (ObjectField, StringField, etc.) have consistent ui:title behavior
  • All fields accept a function for ui:title, with access to formData at least
  • Should these points also be true for ui:description?

Describe alternatives you've considered

  • Creating a custom field to replicate base fields with slight modifications in handling of ui:title

Additional context

  • Sometimes, it's desirable to include form data within a question's title. This is possible if using ObjectField or ArrayField (or maybe even the BooleanField as long as it's using a radio widget?), but not possible with some other field type (e.g., StringField). This seems somewhat arbitrary and might not be that hard to change.

Implementation Thoughts
Seems as though to fix this, we'd need to:
1.) Update the conditional rendering logic in FieldTemplate
2.) Update the StringField to be capable of handling its own ui:title

Does that seem about right?

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