Skip to content

UISchema Props support for custom components

Choose a tag to compare

@vip-git vip-git released this 02 Nov 00:37
1237d77

Now custom components for any given schema property should be defined in ui:schema

Below example :

schema.json

"properties": {
  "customRating": {
      "type": "integer",
      "title": "Custom Rating"
  }
}

ui-schema.json

{
   "customRating": {
	"ui:component": "customRating",
	"ui:options": {
	   "color": "red"
	}
   }
}

Anything passed as part of ui:options will be automatically added as props for given custom component.

Working example can be seen here.