How do I change and use the defaultConfigOptions?

The documentation states that the default configuration options are:

defaultConfigOptions = {
restrict: false,
trim: false,
showUnfocusedDescription: false,
hideRequiredAsterisk: false

How can I override “trim” and always have it set (to true) so that all controls can use it with “true”. I’d hate to have to always be setting that option on each and every control :slightly_smiling_face:

Hi @msueping,

the root JSON Forms component accepts a config object which acts as the default options for each renderer. At render time it’s merged with the UI Schema element’s options which take higher precedence.

So if you’d like to configure trim: true for all renderers you can simply do it via the config and don’t need to specify it for all renderers separately.

Thanks Stefan. That’s exactly what I was looking for. I saw that documented but, being new to React (and web tech in general), it just didn’t sink in. In hindsight it makes perfect sense and is almost trivial to implement. I suppose if it was used in an example I wouldn’t be having this discussion. Thanks again.