Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibilty to filter properties from big json schemas #4075

Open
1 task done
dberardo-com opened this issue Feb 2, 2024 · 2 comments
Open
1 task done

Possibilty to filter properties from big json schemas #4075

dberardo-com opened this issue Feb 2, 2024 · 2 comments

Comments

@dberardo-com
Copy link

Prerequisites

What theme are you using?

core

What is your question?

is it possible to let rjsf know which part of a json schema to select in order to create the form ?

my use case is the following. i have got an auto generated, big json schema, like in here: https://github.com/charlypoly/graphql-to-json-schema

i want to create multiple forms based on just parts of the schema, but of course i dont want to reinvent the wheel having to extract all referenced objects from a starting property. is it possible to tell rjsf which properties to consturct a form for ?

@dberardo-com dberardo-com added needs triage Initial label given, to be assigned correct labels and assigned question labels Feb 2, 2024
@heath-freenome
Copy link
Member

@dberardo-com unfortunately there isn't a simple way to do what you need. Especially if the different parts of the json schema that you don't want to show would cause validations errors. It IS possible to use the uiSchema to hide fields via the hidden widget but if the fields that are hidden have required data in them, then you'll have to provide a transformError function on each form to filter out the errors you don't want to see.

@heath-freenome heath-freenome added awaiting response and removed needs triage Initial label given, to be assigned correct labels and assigned labels Feb 2, 2024
@dberardo-com
Copy link
Author

i see, so whitelisting is not possible, only blacklisting (via hidden attribute) is currently supported ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants