uniforms
uniforms copied to clipboard
Consider support absolute path render with <AutoField>
Motivation why you'd like to see this in uniforms.
We have a use case where we want to display a field down to its sister field. Rn, because uniforms only supports rendering children fields within a specific field, it is not possible. In general, I think it's also beneficial to enable rendering a field given an absolute path. uniforms already provides useField with options to accept this option, what we need to do is to enable it inside createAutoField.
Examples of how others could use this feature.
Usage: <AutoField name="lists.0.name" options={ absoluteName: true} />
Possible workarounds, if applicable.
N/A
Hi @levi-art-rules and thanks for the idea! I definitely see it as something we'd like to have going forward, but introducing any sort of prop (with a sane name) to AutoField may break a lot of projects. It's doable in v4, though.
In the meantime, I'm thinking whether or not we could add something like experimental_nameIsAbsolute flag or even experimental_absoluteName as an alternative to name. What do you think?
CC @vazco/open-source.
Hi @levi-art-rules and thanks for the idea! I definitely see it as something we'd like to have going forward, but introducing any sort of prop (with a sane name) to
AutoFieldmay break a lot of projects. It's doable in v4, though.In the meantime, I'm thinking whether or not we could add something like
experimental_nameIsAbsoluteflag or evenexperimental_absoluteNameas an alternative toname. What do you think?CC @vazco/open-source.
Feature flag sounds good to me. Thank you for your reply. I wonder what the timeline for pushing it will look like?
@radekmie I think adding it as an experimental feature flag sounds good.
As a side note, maybe we could make it easier for us to introduce such changes in the future by adding a mention to the docs like any props prefixed with "uniformsExperimental_" are reserved? I don't think it's a common practice or how useful that will actually be but just a random thought.
@levi-art-rules We can't give you a timeline, sorry!
@wadamek65 Do you think that we should add uniforms prefix too? I never seen a lot of experimental_ props anyway, especially on UI components. In any case, we should add it to FAQ, that we may use them for pre-releases of some features.
(That also means this issue is up for grabs; if you want, do send us a PR!)
@radekmie Just experimental_ also sounds good to me.