You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[√] In the case of a bug report, I understand that providing a SSCCE example is tremendously useful to the maintainers.
Is there no way to create a custom field/widget for data inside an array?
We have a schema for editing a composite object that contains an array of objects. I have tried to use the uiSchema mechanism to create a custom editor (field and widget) for one of the elements in the objects in the array, but with no success. It does not seem to be recognized, as my custom editor component does not appear nor is there an error -- the standard, default editor appears.
I have successfully used the field/widget mechanism to customize the editor for an object element at the top-level, so I don’t know if there is a problem with attempting to customize object elements within arrays, or if I have not specified the identity of the object element properly. All of the examples in the documentation are extremely trivial -- rather than complex, real-world scenarios -- so I don’t know if nesting of this sort is supported.
An extract of the schema definitions I’ve tried is as follows:
I fixed it by following the example of the issue noted above. It was a shortage of clear documentation at the time that confused me, but I do now have it working as desired!
Prerequisites
Is there no way to create a custom field/widget for data inside an array?
We have a schema for editing a composite object that contains an array of objects. I have tried to use the uiSchema mechanism to create a custom editor (field and widget) for one of the elements in the objects in the array, but with no success. It does not seem to be recognized, as my custom editor component does not appear nor is there an error -- the standard, default editor appears.
I have successfully used the field/widget mechanism to customize the editor for an object element at the top-level, so I don’t know if there is a problem with attempting to customize object elements within arrays, or if I have not specified the identity of the object element properly. All of the examples in the documentation are extremely trivial -- rather than complex, real-world scenarios -- so I don’t know if nesting of this sort is supported.
An extract of the schema definitions I’ve tried is as follows:
#1 (widget)
#2 (field)
I’ve tried all sorts of permutations:
Version
Using react-jsonschema-form 1.0.3
The text was updated successfully, but these errors were encountered: