# Custom renderer - tester docs are lacking

**URL:** <https://jsonforms.discourse.group/t/custom-renderer-tester-docs-are-lacking/204>\
**Category:** General\
**Created:** [September 19, 2020, 5:53pm UTC](https://jsonforms.discourse.group/t/custom-renderer-tester-docs-are-lacking/204 "2020-09-19T17:53:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![discobot](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/discobot/32/3_2.png) [@discobot](https://jsonforms.discourse.group/u/discobot)\
**Post date:** [September 19, 2020, 5:53pm UTC](https://jsonforms.discourse.group/t/custom-renderer-tester-docs-are-lacking/204/1 "2020-09-19T17:53:23Z")

</div>

I’m trying to add a custom renderer for a particular path in my schema:

```auto
export default rankWith(3, schemaSubPathMatches('productOnTenant'))

```

and I want it to match `#/properties/productOnTenant/properties/` but it doesn’t match for some reason. Any idea why?

Also, how would one generate an editor for a dictionary? As in, an object whose props are dynamic/vary.

_[[original thread](https://spectrum.chat/jsonforms/general/custom-renderer-tester-docs-are-lacking~7624fa78-41a5-4172-8acf-4262e9e3e3f9) by Georgios Diamantopoulos]_

---

<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 21, 2020, 3:35pm UTC](https://jsonforms.discourse.group/t/custom-renderer-tester-docs-are-lacking/204/2 "2020-09-21T15:35:23Z")

</div>

Hi @georgiosd(georgiosd), `schemaSubPathMatches` expects a second parameter with a predicate. The idea is to conveniently check a nested property of the the element which is to be matched.

If I understand your use case correctly to match on all properties nested in `productOnTenant`, then you can simply write your own tester, e.g.

```auto
const MyTester = (uischema) => uischema.scope.startsWith(`#/properties/productOnTenant/properties/`);

```

In the end each `Tester` just takes `uischema` and `schema` as parameters and returns a boolean. So you can check whatever you like. Would this also cover your dynamic use case?

---

<div class="post-metadata">

**Author:** ![discobot](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/discobot/32/3_2.png) [@discobot](https://jsonforms.discourse.group/u/discobot)\
**Post date:** [September 22, 2020, 7:37am UTC](https://jsonforms.discourse.group/t/custom-renderer-tester-docs-are-lacking/204/3 "2020-09-22T07:37:55Z")

</div>

_[Georgios Diamantopoulos]_

Sounds good, thank you. It’d be great to add all that to the docs 🙂

If jsonforms is lagging while editing, I should check for re-renders in the parents, right?

---

<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 22, 2020, 1:02pm UTC](https://jsonforms.discourse.group/t/custom-renderer-tester-docs-are-lacking/204/4 "2020-09-22T13:02:15Z")

</div>

I see you already opened the [rerender issue](https://github.com/eclipsesource/jsonforms/issues/1641). Just note that we have a “known” performance problem when doing many edits (e.g. typing fast in a text control) in large forms as the whole data object is validated and a rerender triggered (which mostly should result in memoized cache returns) on every keystroke. For these cases we would like to implement a debounce mechanism, so the whole cycle is not executed so often. See [this question](https://spectrum.chat/jsonforms/general/performance-issue-lag-happening-on-typing~c2b961a2-988f-4ac3-ab89-02c70cb53f81) for more information.
