rjsf-team/react-jsonschema-form

Feature Request: Ability to conditionally show non-required fields

Open

#2 164 ouverte le 10 déc. 2020

Voir sur GitHub
 (1 commentaire) (0 réactions) (0 assignés)TypeScript (2 136 forks)batch import
corefeaturehelp wanted

Métriques du dépôt

Stars
 (13 175 stars)
Métriques de merge PR
 (Merge moyen 3j 17h) (32 PRs mergées en 30 j)

Description

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!

Guide contributeur