rjsf-team/react-jsonschema-form

Feature Request: Ability to conditionally show non-required fields

Open

#2,164 建立於 2020年12月10日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)TypeScript (2,136 fork)batch import
corefeaturehelp wanted

倉庫指標

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

描述

Prerequisites

Description

In a schema with many required and optional fields, it would be handy to be able to conditionally only show required fields, especially if few users ever need them.

<Form
    requiredOnly={true}

Even better would be the ability to filter fields using an arbitrary function, for example:

<Form
    filter={field => field.isRequired && field.description.includes("test")}

But that might be going overboard. Thanks for considering!

貢獻者指南