In oneOf i want to change names of const and title

The JSONForms way to give options - [{“const”: “female”, “title”: “Female”}];
But i want to give like this - [{“label”: “female”, “value”: “Female”}];
I am ok to make a custom renderer for this , have any idea if it is possible right now.

Hi @SatendraRaghav,

This can very easily be done via a custom renderer. Your renderer basically just reuses the unwrapped variant of the MaterialEnumControl but hands over the options manually by reading them out of the schema prop.

Thanks @sdirix for respone,
But in JSONforms , validation only use const as value and save const in formdata, but I want to save whole object({title:“one”,value:1}) in formdata and also do not want to see error.
Currently , If i save whole object in formData by custom renderer then i face error and the error message is - “must be equal to constant”.
Can you suggest me a way to solve this .

Hi @SatendraRaghav,

If your custom renderer saves both, const and title as the object in the data, then the JSON Schema must also describe that. Whenever you data and JSON Schema diverges, then you will be getting errors.

There are convenient JSON Schema validators online with which you can check during development whether you will be receiving errors.