-
Notifications
You must be signed in to change notification settings - Fork 35
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
Inconsistent ui:title
behavior
#299
Comments
So I think I can see situations where this would be handy, but just to be certain can you give some examples? Would you only want the form data, or would you also want other things like the title or validation criteria from other fields? This has i18n implications but I can imagine needing something similar for i18n anyway so it's not clearly pro or con in that aspect. I'm more concerned that these functions have access to all data on the form and thus require unoptimizable global recalc on a change anywhere on the form. Since that's already the case in 1.x it's not making things worse, but as I mentioned in #224 I'd like to explore ways to avoid this for 2.0. |
Sure thing - we recently had a page with a Oh and just to clarify, this is possible to do depending on what field type you use. I'm advocating for consistent treatment across all the included field types. As to accessing things outside the form data itself, I'm not sure - I could see use-cases there but we don't have one right this moment. |
I think we're consistent here, it's just that RJSF used (and now has visited upon us) the ambiguous term The All the standard form fields go through RJSF's Stepping away from the implementation for a minute, does this feature end up being a good UX? I can imagine multiple instances of the same disability (knee injury, drug rehab, etc.) that someone might have and asking a question about something answered several pages earlier isn't ideal. If it's always in the context of the current set of disability questions then it seems like a page title would be enough. |
Is your feature request related to a problem? Please describe.
Different fields accept different things for the
ui:title
uiSchema property.Describe the solution you'd like
ObjectField
,StringField
, etc.) have consistentui:title
behaviorui:title
, with access toformData
at leastui:description
?Describe alternatives you've considered
ui:title
Additional context
ObjectField
orArrayField
(or maybe even theBooleanField
as long as it's using aradio
widget?), but not possible with some other field type (e.g.,StringField
). This seems somewhat arbitrary and might not be that hard to change.Implementation Thoughts
Seems as though to fix this, we'd need to:
1.) Update the conditional rendering logic in
FieldTemplate
2.) Update the
StringField
to be capable of handling its ownui:title
Does that seem about right?
The text was updated successfully, but these errors were encountered: