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

Custom description field #214

Merged
merged 4 commits into from
May 26, 2016
Merged

Conversation

almet
Copy link
Contributor

@almet almet commented May 25, 2016

This adds the ability to customize the description using a description field.

This breaks the previous behaviour: it was returning a p for ArrayFields and divs for ObjectFields. This is now returning a div for both.

I also added some tests in the ArrayField to check that it's able to handle custom TitleFields.

paired with @Natim, r? @n1k0


You can provide your own implementation of the `DescriptionField` base React component for rendering any description.


Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: one empty line too many

@n1k0
Copy link
Collaborator

n1k0 commented May 25, 2016

LGTM with nits addressed. It's a little sad we can't accept react elements as description, but that's definitely not an option in a JSONschema :)

Among other cosmetic changes, we now pass custom titles and descriptions using
the `fields` property (whereas we were passing it directly before, a behaviour
now deprecated).
@almet
Copy link
Contributor Author

almet commented May 26, 2016

I've updated the branch with commits addressing your comments :)

@n1k0
Copy link
Collaborator

n1k0 commented May 26, 2016

Perfect, thanks o/

@n1k0 n1k0 merged commit e6079b1 into rjsf-team:master May 26, 2016
@n1k0
Copy link
Collaborator

n1k0 commented May 26, 2016

Released as part of v0.31.0.

@almet almet deleted the custom-description-field branch May 26, 2016 06:38
@almet
Copy link
Contributor Author

almet commented May 26, 2016

Awesome, thanks!

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.

None yet

2 participants