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

Add example for collapsing fields using custom FieldTemplate #1294

Merged

Conversation

jglev
Copy link

@jglev jglev commented May 22, 2019

Reasons for making this change

The current documentation contains a call for an example of collapsing fields in a form. This PR adds such an example, using a custom FieldTemplate.

This relates to #268, and hopefully resolves #598 -- the example I've linked doesn't show it, but I currently have also implemented an "Expand / Hide All" button using the React state of the component housing the <Form> component and the formContext object that's used in the linked example.

Checklist

  • I'm updating documentation
  • I'm adding or updating code
    • I've added and/or updated tests
    • I've updated docs if needed
    • I've run npm run cs-format on my branch to conform my code to prettier coding style
  • I'm adding a new feature
    • I've updated the playground with an example use of the feature

Copy link
Member

@epicfaace epicfaace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks good. In the future, it might be nice to add this behavior into the library itself by adding an attribute collapsible under ui:options.

@epicfaace epicfaace merged commit 7530230 into rjsf-team:master May 24, 2019
@jglev
Copy link
Author

jglev commented May 24, 2019

Thank you very much!

In the future, it might be nice to add this behavior into the library itself by adding an attribute collapsible under ui:options.

That sounds good to me, too! I may do some work on that if/when I have the time in the next few weeks.

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

Successfully merging this pull request may close these issues.

Question: hide/show functionality for large forms?
2 participants