I want react-jsonschema-forms (rjsf) to render a custom widget for each {type: 'string', format: 'duration'} field and an other one for {type: 'number', format: 'currency'}.
{type: 'string', format: 'duration'}
{type: 'number', format: 'currency'}
With react-jsonschema-forms (rjsf) as I can overwrite/exchange the Widgets used by the form as documented:
const widgets = {'TextWidget': MyFanycTextWidget} return <Form {...props} widgets={widgets} />
But since TextWidget is used for many type/format combinations, this is too much.
TextWidget
I could overwrite the widgets used by using ui:schema, but for that I would have to new the shape of the jsonschemata used in advance (which I do not).
Internally rjsf conatains a niche type/format mapping in widgetMap.
Is there an way to overwrite / monkeypatch / extend this? Or an other aproach?
1.4m articles
1.4m replys
5 comments
57.0k users