Skip to content

Extensibility: Custom components enabled

Choose a tag to compare

@vip-git vip-git released this 22 Aug 10:33

Component extensibility enabled for jsonschema.

Following example
Schema.json

{
  "title": "A registration form",
  "description": "A simple form example.",
  "type": "object",
  "properties": {
    "customRating": {
      "type": "integer",
      "title": "Custom Rating",
      "component": "customRating"
    },
  }
}

Then mounting your JSON Schema Form with given name definition inside props components

<Form
  schema={schema}
  uiSchema={uiSchema}
  formData={formData}
  onCancel={onCancel}
  onSubmit={onSubmit}
  onUpload={onUpload}
  onChange={onFormChanged}
  components={{
    customRating: ({ onChange }) => (
  		<CustomRating onChange={onChange} formData={formData} />
    ),
  }}
  submitOnEnter
  activityIndicatorEnabled
/>

Formdata.json

{
  "customRating": 3
}

Running Example

Detailed Docs :

image