fix complex renderers by kchobantonov · Pull Request #2392 · eclipsesource/jsonforms
@sdirix please review - this fixes oneOf renderer where it could clear out the whole data - check for example - oneOf - Preselection for Primitives (Issue 1273 ) example and try to switch between diferent oneOf when they are populated -once the dialog is clicked to apply the selectio the data will not be an object
the other changes are some stuff that I'm looking to do and are part of the excercise - be able to have a generic editor for jsonschema - e.g. the schema to be the jsonschema meta model and then to be able to create a new jsonschema with that - other are other stuff that I'm working on fixing but are not yet ready - like having a MixedControl which can handle mixed types by asking you to select the type of the element before showing you the actual control to work with the data when creating a new data and if the data is present then automatically selecting the correct type.
One thing that I'm having an issue is with the jsonforms core resolveSchema method which when it can't find the property it will return undefined and in the case of dynamic schema you do not really have a structure
{ "type: "object", "additionalProperties": true }
and we try to find a property in that schema then the resolveSchema does not give me the schema that I have provided. Locally I'm doing some hacks which I do not really like for example attaching a Symbol keys to the schema that points to a function that can be then invoke by the resolveSchema in that particular case but that looks too hacky. If you have any suggestions please let me know.
Also are you interested in such renderer - MixedRenderer or maybe we can call it UnionRenderer - anyway let me know if such one could go to the jsonform vuetify render repo - otherwise I won't spent much time to even prepare such PR