rjsf-team/react-jsonschema-form

Feature Request: Ability to conditionally show non-required fields

Open

#2.164 geöffnet am 10. Dez. 2020

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (2.136 Forks)batch import
corefeaturehelp wanted

Repository-Metriken

Stars
 (13.175 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 3T 17h) (32 gemergte PRs in 30 T)

Beschreibung

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!

Contributor Guide