rjsf-team/react-jsonschema-form

Feature Request: Ability to conditionally show non-required fields

开放

#2,164 创建于 2020年12月10日

 (1 条评论) (0 个反应) (0 位负责人)TypeScript (2,136 个派生)batch import
corefeaturehelp wanted

仓库指标

星标
 (13,175 个星标)
PR 合并指标
 (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!

贡献者指南