# How do I change and use the defaultConfigOptions?

**URL:** <https://jsonforms.discourse.group/t/how-do-i-change-and-use-the-defaultconfigoptions/384>\
**Category:** General\
**Created:** [September 11, 2021, 4:59pm UTC](https://jsonforms.discourse.group/t/how-do-i-change-and-use-the-defaultconfigoptions/384 "2021-09-11T16:59:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![msueping](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/msueping/32/148_2.png) [@msueping](https://jsonforms.discourse.group/u/msueping)\
**Post date:** [September 11, 2021, 4:59pm UTC](https://jsonforms.discourse.group/t/how-do-i-change-and-use-the-defaultconfigoptions/384/1 "2021-09-11T16:59:08Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![sdirix](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/sdirix/32/1073_2.png) [@sdirix](https://jsonforms.discourse.group/u/sdirix)\
**Post date:** [September 13, 2021, 6:00am UTC](https://jsonforms.discourse.group/t/how-do-i-change-and-use-the-defaultconfigoptions/384/2 "2021-09-13T06:00:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![msueping](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/msueping/32/148_2.png) [@msueping](https://jsonforms.discourse.group/u/msueping)\
**Post date:** [September 13, 2021, 12:54pm UTC](https://jsonforms.discourse.group/t/how-do-i-change-and-use-the-defaultconfigoptions/384/3 "2021-09-13T12:54:49Z")

</div>

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.
