rjsf-material-ui icon indicating copy to clipboard operation
rjsf-material-ui copied to clipboard

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

Open arime opened this issue 5 years ago • 0 comments

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

arime avatar Feb 20 '20 17:02 arime