I am stuck on a small problem whit a ‘tooltip’ custom renderer which does not works for elements with an enum. Base on the custom renderer exemple we have this:
The bindings and the renderer always have to fit together. For most basic renderers withJsonFormsControlProps is sufficient but for example the enum renderers need more specialized bindings. These add the options you are now missing.
The MaterialEnumControl is another specialty as it itself does some sort of mini-dispatching between autocomplete and “normal” (i.e. pick list) variant. See here. If you just want to force pick list you could just use the first variant. Here you can see the appropriate withJsonFormsEnumProps.
Register an own custom renderer for each existing renderer. As you know what you’re wrapping you can just return the appropriate renderer in each case. This is the easy way, it’s just some work to do this for all the renderers.
Alternatively you could register a custom renderer which is able to render the tooltip for all elements, no matter which one. This one could internally then use JsonFormsDispatch to delegate to the appropriate renderer again. For this to work you should:
Not use a binding for this wrapper element as you can then just pass your props through to JsonFormsDispatch
Make sure that you don’t dispatch to yourself in an endless loop. For this you could for example modify the renderers which you hand over to JsonFormsDispatch to exclude this special wrapping renderer. If you need nested wrapping one of your custom renderers will need to add the renderer back.