Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 1, 2020. It is now read-only.
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
@rusekr

Description

@rusekr

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp