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!

贡献者指南