Skip to content

Remove startCase from label in MaterialEnumArrayRenderer.tsx #1903

@JoshuaFortriede

Description

@JoshuaFortriede

Describe the bug

When an enum array is rendered as checkboxes, the checkbox label is changed from the actual value. This is done by using the lodash.startCase function.

Expected behavior

It is expected that the labels of the checkboxes are exactly the same as the string specified in the enum.

Steps to reproduce the issue

Step 1:
Use form of:
"isotype":{
"type":"array",
"uniqueItems":true,
"items":{

                    "type":"string",
                    "enum":[
                    "IgG",
                    "IgM",
                    "IgG1",
                    "IgG2a",
                    "IgG2b",
                    "IgG3",
                    "IgG1/IgG2a",
                    "IgA",
                    "IgE"
                ]
                },
                "example":"IgG",
                "title":"Isotype",
                "description":"The isotype of the antibody"
            }

Step 2:
Notice checkbox labels are not the same as the enum strings.

Screenshots

Current Behavior
image

Expected Behavior
image

In which browser are you experiencing the issue?

Version 99.0.4844.82

Framework

No response

RendererSet

No response

Additional context

The code is line 71 of packages/material/src/complex/MaterialEnumArrayRenderer.tsx. The request is to remove the startCase function.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions