rjsf-team/react-jsonschema-form

oneOf + const enums do not use empty string title

クローズ

#4,448 opened on 2025/01/13

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (2,136 件のフォーク)batch import
any-one-all-ofbughelp wanted

Repository metrics

Stars
 (13,175 個のスター)
PR merge metrics
 (平均マージ 3d 17h) (30d で 32 merged PRs)

説明

Prerequisites

What theme are you using?

core

Version

5.x

Current Behavior

We can define an enum with oneOf:

{
      "oneOf": [
        {
          "const": "empty",
          "title": ""
        },
        {
          "const": "active"
        }
      ]
}

But if the title is an empty string, the const value is used.

Expected Behavior

The empty string option is used instead of falling back to the const value.

Steps To Reproduce

Playground link

Environment

No response

Anything else?

No response

コントリビューターガイド