Not able to bind select-custom renderer

Hi @sdirix

I am having below schema’s

"address" : [
 {
  "wing" : "A",
  "floor" : "2"
 }
]
{
 address : {
 	"type" : "array",
	"items" : 
	 "type" : "object",
	 "properties" : {
	    "wing" : {
 	      "type" : "string",
	      "enum" : ["A", "B"]	
	    },
	    "floor" : {
		"type" :"string",
		"enum" :["1", "2", "3"]
	     }
	  }
	}
 }
}
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

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

#/properties/address/

But it ends up making itself as table

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.

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 renderers, so this should be straightforward.


To clarify the scope usage:

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.

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

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)

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