rjsf-team/react-jsonschema-form

oneOf + const enums do not use empty string title

已關閉

#4,448 建立於 2025年1月13日

 (0 則留言) (0 個反應) (0 位負責人)TypeScript (2,136 個分叉)batch import
any-one-all-ofbughelp wanted

倉庫指標

星標
 (13,175 顆星)
PR 合併指標
 (平均合併 3天 17小時) (30 天內合併 32 個 PR)

描述

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

貢獻者指南