vazco / uniforms

A React library for building forms from any schema.

Home Page:https://uniforms.tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Example Of Progressive Disclosure

jbeuckm opened this issue · comments

We need to progressively disclose properties that appear according to if-then conditionals in our json-schema. This does not seem to be possible. The way I think it would have to be done currently is to list all properties at the top level, then conditionally hide the right ones using an arrangement of AutoField components.

Is there a demo of or known way to implement progressive disclosure?

Hi @jbeuckm, I think it is a similar issue to #845. Does this solve your problem?

The way I think it would have to be done currently is to list all properties at the top level, then conditionally hide the right ones using an arrangement of AutoField components.

You're not limited to listing all properties at the top level, but the approach is correct. Have a look at the issue that @piotrpospiech linked (#845). It suggests going with the DisplayIf field.

For a full demo with a complex condition builder, have a look at https://forminer.com/demo.

I'm also closing this issue due to a lack of activity. Feel free to reopen if needed.