cybertec-postgresql / rjsf-material-ui

[Archived] Material UI theme for react-jsonschema-form.
https://cybertec-postgresql.github.io/rjsf-material-ui/
MIT License
62 stars 25 forks source link

Default value 0 for integer or number type property is not working #179

Open arime opened 4 years ago

arime commented 4 years ago

When an integer or number type property has a default value of 0 defined, the value ends up in form data but it is not reflected on the form itself, leaving the field empty. A non-zero default value works.

For example this does not work:

"age": {
  "type": "integer",
  "default": 0
}

On the other hand, this works fine:

"age": {
  "type": "integer",
  "default": 1
}

Playground example situation:

Screenshot 2020-02-20 at 19 03 03