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

Null Fields on Material Ui 5 #4110

Open
3 of 4 tasks
Bonfims opened this issue Feb 29, 2024 · 2 comments
Open
3 of 4 tasks

Null Fields on Material Ui 5 #4110

Bonfims opened this issue Feb 29, 2024 · 2 comments

Comments

@Bonfims
Copy link

Bonfims commented Feb 29, 2024

Prerequisites

What theme are you using?

material-ui

Version

5.x

Current Behavior

On playground there is an "Null Fields" type example, which allows us to set type="null" on schema and set "title" and "description" fields to display on form to add extra information. However, the "title" field objects of type "null" are not rendered, and this issue can also be reproduced on playground too.

Expected Behavior

The "title" field on objects with type="null" need to be rendered too

Steps To Reproduce

On playground https://rjsf-team.github.io/react-jsonschema-form/, with theme material-ui-5, on "Null Fields" example

Environment

- OS: Ubuntu 20.04
- Node: 20.9.0
- npm: 10.1.0

Anything else?

No response

@Bonfims Bonfims added bug needs triage Initial label given, to be assigned correct labels and assigned labels Feb 29, 2024
@Bonfims
Copy link
Author

Bonfims commented Feb 29, 2024

I noticied that a can avoid this by setting optional object type, like:

{
    "extra-info": {
            "title": "My title extra info",
            "description": "My extra info description",
            "type": ["null","object"]
    }
}

thank you all

@heath-freenome
Copy link
Member

This actually is broken in all themes that aren't core, antd or bootstrap-4. If this is important to you, we'd love to see a PR with a fix in it. Thanks!

@heath-freenome heath-freenome added help wanted and removed needs triage Initial label given, to be assigned correct labels and assigned labels Mar 1, 2024
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

2 participants