Skip to content

Empty nullable fields are crushed for unknown reason since last 6th in beta version #4662

Open
@adrndfn

Description

@adrndfn

Prerequisites

What theme are you using?

mui

Version

6.0.0-beta.10

Current Behavior

Empty nullable select are crushed for unknown reasons seems last versions

Image

Expected Behavior

Expected behaviour should be input size depends of label when select nullable is empty (no selection)

Steps To Reproduce

  1. Using updated mui theme and 6.0.0-beta.10 rjsf version

  2. Set a schema with a nullable enum of string (and maybe with other simple type like nullable string to compare render )

        "example-of-enum": {
            "anyOf": [
                {
                    "type": "string",
                    "enum": [
                        "Test1",
                        "Test2",
                    ],
                    "ui:enumNames": [
                        "Test1",
                        "Test2",
                    ]
                },
                {
                    "type": "null",
                    "default": null
                }
            ],
            "title": "Example of enum"
        },
        "example-of-string": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null",
                    "default": null
                }
            ],
            "title": "Example of string"
        },
  1. Use this schema in a uiSchema RJSForm page / react environment

  2. Identify crushing problems on nullable empty select mui component ( created from previous string enum nullable ) in comparaison to text field for example.

Environment

- OS: debian
- Node: v22.13.1
- npm: 10.9.2

Anything else?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions