Skip to content

Add option to change the AddButton's text for particular fields via uiSchema #2357

@ennoente

Description

@ennoente

Prerequisites

Description

It seems that the translation/localization are ongoing issues (as seen in #739 and #1986).
What we also need is a way to translate the AddButton (german in our case), which is not yet supported by the library.
The current solution uses plain JavaScript to change the HTML of the rendered form which we think of
as a rather inelegant and not permanent solution.

This is why we propose to add a ui:addButtonText field to the uiSchema to change the AddButton's text for a particular
field. For a simple uiSchema of const uiSchema = { "ui:addButtonText": "Custom button text" };
this would change the AddButton's text from the default Add Item to Custom button text.

Since the core and bootstrap themes do not have texts on the AddButton this would be a change concerning the other
four themes (antd, fluent-ui, material-ui and semantic-ui).

I have started a PR to work on that feature (#2348) Please share your thoughts and feedback.

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