rjsf-team / react-jsonschema-form

A React component for building Web forms from JSON Schema.
https://rjsf-team.github.io/react-jsonschema-form/
Apache License 2.0
13.94k stars 2.17k forks source link

Empty item in selectbox for enum is not visible #4197

Closed Vity01 closed 1 week ago

Vity01 commented 1 month ago

Prerequisites

What theme are you using?

material-ui

Version

5.x

Current Behavior

Although the enum property in the model is nullable and not required, empty value for selection is missing.

Nowadays there is no easy way for user to deselect already selected value. We use 'blank space' as an empty item and it's barely visible and also it's not a perfect engineering solution.

It's working for other than Material-UI eg: working combobox: In RJSF demo

For default theme, you can see an empty available item image

Not not for the MaterialUI: image RJSF DEMO - bug

Expected Behavior

Empty item should available also for MaterialUI

Steps To Reproduce

No response

Environment

- OS:
- Node:
- npm:

Anything else?

No response

kevinmichaelchen commented 1 month ago

It would be great if deselection and nullable enums were supported.

I'm sure my company would gladly contribute to an Algora bounty if such a thing were available.

heath-freenome commented 1 month ago

@Vity01 @kevinmichaelchen Great catch. The core theme built in an unselect capability that is similar to what the core theme does in all of the other themes. Hopefully we can get a fix up for this in the next week or so.