rjsf-team/react-jsonschema-form

Problem with contains condition in the array field and conditionally rendered subschema with the integer keys when liveOmmit and omitExtraData are set to true

Open

#3,920 创建于 2023年10月25日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)TypeScript (13,175 star) (2,136 fork)batch import
any-one-all-ofarraysbughelp wantedif-then-else

描述

Prerequisites

What theme are you using?

mui

Version

5.13.2

Current Behavior

I have hit a strange bug, not sure where to look, so I will post working and not working schemas. Hopefully, the maintainers will have an idea of what is wrong.

#1. if-then with contains. The conditionally rendered schema has string keys. This works. #2. if-then with contains. The conditionally rendered schema has integer keys. This does not work.

Both work well when liveOmmit and omitExtraData are set to false

Expected Behavior

I would expect that both scenarios work with turned on liveOmmit and omitExtraData. However it seems that they reset the field that is used for rendering the dependent schema, but only if that field options match the keys in the dependent schema. This looks like a bug to me

Steps To Reproduce

#1

#2

Environment

- OS: MacOsx
- Node: latest
- npm: latest

Anything else?

No response

贡献者指南