Skip to content

Unable to add new item for object with additionalProperties within anyOf / oneOf with liveOmit and omitExtraData #4366

Open
@UsainBloot

Description

@UsainBloot

Prerequisites

What theme are you using?

core

Version

5.x

Current Behavior

When liveOmit and omitExtraData options are enabled, then you are unable to add a new item to an object that uses additionalProperties within an anyOf or oneOf.

Example json schema

{
  "oneOf": [
    {
      "type": "object",
      "additionalProperties": {
        "foo": {
          "type": "string"
        }
      }
    }
  ]
}

RJSF options

liveOmit: true
omitExtraData: true

Expected Behavior

Can add new items

Steps To Reproduce

  1. Visit playground
  2. Try and add a new item

Environment

Playground

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions