Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task done
ennoente opened this issue May 3, 2021 · 1 comment
Closed
1 task done

Comments

@ennoente
Copy link

ennoente commented May 3, 2021

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.

@heath-freenome
Copy link
Member

Fixed in the v5 beta via new ButtonTemplates feature, see the 5.x migration guide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants