React-jsonschema-form: Default 'null' value is not applied to a field with type ["null", "object"]

Created on 6 Feb 2020  Â·  2Comments  Â·  Source: rjsf-team/react-jsonschema-form

Prerequisites

  • [x] I have read the documentation;
  • [x] In the case of a bug report, I understand that providing a SSCCE example is tremendously useful to the maintainers.
  • [x] I'm providing a shared playground link demonstrating the issue.

Description

Default 'null' value is not applied to a field with type ["null", "object"]

Steps to Reproduce

GIVEN: a property of type ["null", "object"] AND default value is null AND ui:emptyValue = null
See shared playground link

Expected behavior

default value is null

Actual behavior

default value is an empty object {}
both default and ui:emptyValue values are ignored for an object property.

Version

Version of the playground. I guess, current latest stable

Note:
It works fine for ["null", "string"] and ["null", "number"] types.

bug

Most helpful comment

Sure - I have some time tomorrow to take a look at this.

On Thu, Feb 13, 2020 at 5:28 PM Ashwin Ramaswami notifications@github.com
wrote:

Not sure what's causing this ... the nullable feature was added in #1213
https://github.com/rjsf-team/react-jsonschema-form/pull/1213. @wms
https://github.com/wms could you maybe take a look?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rjsf-team/react-jsonschema-form/issues/1581?email_source=notifications&email_token=AAFCBJBROGD2EFVUCKCWB4LRCV7M3A5CNFSM4KQ3HF7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELV4BBA#issuecomment-585875588,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAFCBJGEJD3U5EID77636K3RCV7M3ANCNFSM4KQ3HF7A
.

All 2 comments

Not sure what's causing this ... the nullable feature was added in https://github.com/rjsf-team/react-jsonschema-form/pull/1213. @wms could you maybe take a look?

Sure - I have some time tomorrow to take a look at this.

On Thu, Feb 13, 2020 at 5:28 PM Ashwin Ramaswami notifications@github.com
wrote:

Not sure what's causing this ... the nullable feature was added in #1213
https://github.com/rjsf-team/react-jsonschema-form/pull/1213. @wms
https://github.com/wms could you maybe take a look?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rjsf-team/react-jsonschema-form/issues/1581?email_source=notifications&email_token=AAFCBJBROGD2EFVUCKCWB4LRCV7M3A5CNFSM4KQ3HF7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELV4BBA#issuecomment-585875588,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAFCBJGEJD3U5EID77636K3RCV7M3ANCNFSM4KQ3HF7A
.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

n1k0 picture n1k0  Â·  3Comments

MedinaGitHub picture MedinaGitHub  Â·  3Comments

mfulton26 picture mfulton26  Â·  3Comments

sstarrAtmeta picture sstarrAtmeta  Â·  3Comments

ClockerZadq picture ClockerZadq  Â·  3Comments