This repository was archived by the owner on Jun 1, 2020. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork25
This repository was archived by the owner on Jun 1, 2020. It is now read-only.
How to translate "Add item" label? Where to put props.label for AddButton widget. #174
Open
Description
Hello!
Tested with no luck as
import { withTheme } from 'react-jsonschema-form';import { Theme as MuiTheme } from 'rjsf-material-ui';const MuiForm = withTheme(MuiTheme); finalSchema.buttonLabel = "my label"; finalSchema['ui:options'] = { addButtonLabel: 'my label' };And later:
<MuiForm schema={props.schema} ref={props.formRef} uiSchema={finalSchema}...I'am getting default hardcoded "+add Item" anyway for schemes supporting arrays if items.
On examples pagehttps://cybertec-postgresql.github.io/rjsf-material-ui/ here are "Custom array" example and "Arrays" example. In latter to translate button I need to putui:options.addButtonLabel to every parameter to translate. But can I use something like "default label" for any parameter.
Use case - I need to just translate default "add item". Not customize for parameters.
Metadata
Metadata
Assignees
Labels
No labels