# Not able to bind select-custom renderer

**URL:** <https://jsonforms.discourse.group/t/not-able-to-bind-select-custom-renderer/1733>\
**Category:** General\
**Created:** [September 26, 2023, 8:26am UTC](https://jsonforms.discourse.group/t/not-able-to-bind-select-custom-renderer/1733 "2023-09-26T08:26:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![howdyAnkit](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/howdyankit/32/563_2.png) [@howdyAnkit](https://jsonforms.discourse.group/u/howdyAnkit)\
**Post date:** [September 26, 2023, 8:26am UTC](https://jsonforms.discourse.group/t/not-able-to-bind-select-custom-renderer/1733/1 "2023-09-26T08:26:02Z")

</div>

Hi @sdirix

I am having below schema’s

```auto
"address" : [
 {
  "wing" : "A",
  "floor" : "2"
 }
]

```

```auto
{
 address : {
 	"type" : "array",
	"items" : 
	 "type" : "object",
	 "properties" : {
	    "wing" : {
 	      "type" : "string",
	      "enum" : ["A", "B"]	
	    },
	    "floor" : {
		"type" :"string",
		"enum" :["1", "2", "3"]
	     }
	  }
	}
 }
}

```

```auto
UISCHEMA

{
 "type" : "Control",
 "scope": "#/properties/address/items/properties/wing"
},
{
 "type" : "Control",
 "scope": "#/properties/address/items/properties/floor"
},

```

The issue with above is I am trying to bind this fields into select custom renderer but the data are not populating in UI also I am not able to figure out what data is user updating on checking the path it’s constructed like this

```auto
address.properties

```

is there any way you can suggest this as single select custom renderer so that data can be populated also I tried using something like this in UI SCHEMA

```auto
#/properties/address/

```

But it ends up making itself as table

---

<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 27, 2023, 7:56am UTC](https://jsonforms.discourse.group/t/not-able-to-bind-select-custom-renderer/1733/2 "2023-09-27T07:56:24Z")

</div>

Hi @howdyAnkit,

In some renderer sets we support two different ways of visualizing an array. Either as a table, or as a (collapsible) list. Which one of the visualizations is chosen depends on whether the `items` are suitable to be presented in a table (i.e. a flat object) and the [UI Schema options](https://jsonforms.io/docs/uischema/controls#the-detail-option).

If you are trying to customize the cells of the table, then you need to register a custom `cell` renderer. The API is very similar to regular custom `renderer`s, so this should be straightforward.

* * *

To clarify the scope usage:

> [@howdyAnkit](#):
>
> ```auto
> {
> "type" : "Control",
> "scope": "#/properties/address/items/properties/wing"
> },
> {
> "type" : "Control",
> "scope": "#/properties/address/items/properties/floor"
> },
> 
> ```

Controls which point into an array will not work properly as it’s not clear for which array entry element they shall be rendered. Therefore, whenever we handle arrays, the `items` of the array have a “nested scope”, i.e. a `detail` UI Schema will be used which treats the `array` as the root of the `JSON Schema`, e.g.

```auto
{
 "type" : "Control",
 "scope": "#/properties/wing"
},
{
 "type" : "Control",
 "scope": "#/properties/floor"
},

```

---

<div class="post-metadata">

**Author:** ![howdyAnkit](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/howdyankit/32/563_2.png) [@howdyAnkit](https://jsonforms.discourse.group/u/howdyAnkit)\
**Post date:** [September 27, 2023, 2:15pm UTC](https://jsonforms.discourse.group/t/not-able-to-bind-select-custom-renderer/1733/3 "2023-09-27T14:15:08Z")

</div>

> [@sdirix](#):
>
> If you are trying to customize the cells of the table, then you need to register a custom `cell` renderer. The API is very similar to regular custom `renderer`s, so this should be straightforward.

Is this suggestion releated for fixing a select custom renerer we have similar code to this  
select-renderer([https://github.com/eclipsesource/jsonforms/blob/master/packages/angular-material/src/controls/autocomplete.renderer.ts](https://github.com/eclipsesource/jsonforms/blob/master/packages/angular-material/src/controls/autocomplete.renderer.ts))

also can you please suggest the changes so that dropdowns can appear from enums because i made the above uischema changes and still cant see the data bindings happening. i am aware of the solution of this.form.setValue(datat[0].keyname)

but that dosent looks the right way to me as similar issue is appearning the dropdowns are not coming and the custom renderer is not able to figure out which index is it on like is it on wing select or floor select component. although they both use same custom renderer
