Hello!
I’m on 2.3.2 and can’t seem to get default values to appear. I notice that there are default values set in schema in this example but it is unused Layout Example - JSON Forms.
Upon loading, I’m met with empty fields that are not populated with default values,
Here is part of my schema written in yaml.
nationality:
default: US
enum:
- DE
- IT
- INDO
- JP
- US
- RU
type: string
number_field:
default: 6
maximum: 10
minimum: 5
type: number
rico_field:
type: string
since_sync:
type: string
test_field:
default: default value
type: string
And my component
<JsonForms
data={data}
schema={schema}
uischema={uischema}
renderers={materialRenderers}
cells={materialCells}
onChange={({ errors, data }) => {console.log(data); updateData(errors, data)}}
/>
[original thread by Ricardo Guntur]