How to bind data in custom renderer with multiple input

In an Angular project using JSONForms, I need to create a custom renderer with two select elements. Both selects must be within a single renderer because I have several rules linking them, and the content of the selects can be anything as long as they are related by a set/subset relationship.
The schema should be :

"setSubset": {
    "type": "object",
    "properties": {
        "set": {
            "type": "string",
            "enum": ["s1", "s2", "s3"]
        },
        "subset": {
            "type": "string",
            "enum": ["a", "b", "c"]
        }
    }
}

UiSchema :

{
    "type": "Control",
    "scope": "#/properties/setSubset"
}

But how can I bind the datas so that I have ?

"setSubset": {
    "set": "s1",
    "subset": "b"
}

My first attemp was to implement the custom renderer like the other build-in renderer by inheriting JsonFormsControl and declaring :

schema :

"countryCity": {
    "type": "string"
}

uischema:

{
    "type": "setSubset",
    "scope": "#/properties/countryCity"
}

And I build the data by concatenating the values of both selects as a JSON string:

"countryCity": {
    "country": "FR",
    "city": "Paris"
}

Hi @cysum,

The easiest way is to create a custom renderer for the whole setSubset object. In it you have intuitive access to the schema and data of both properties and can render arbitrary UI for both of them.

In case you have additional properties in setSubset which you still want to behave as usual, then just dispatch back for them to JSON Forms via the jsonforms-outlet component.

See here for our default object renderer which just generates a UI Schema for its properties and then dispatches back in one-go as the UI Schema will consist out of a layout and a control for each property.

You can copy it, but instead of dispatching back to JSON Forms you render your UI. If there are more properties than set and subset you can also copy the dispatching but additionally delete the controls for set and subset as you already take care of them.