You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/react-renderer-demo/src/app/pages/renderer/renderer-api.md
+25-1Lines changed: 25 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ Form Renderer provides a lot of customization via props.
32
32
|<RouterLinkhref="/renderer/unmounting"><Link>clearOnUnmount</Link></RouterLink>|bool|Will clear values of unmounted components. You can also set this to specific component in the form schema.|false|
33
33
|canReset|bool|Show/hide reset button.|false|
34
34
|onReset|func|A reset callback. You don't need to manually clear the form values!||
35
-
|onCancel|func|A cancel callback.||
35
+
|onCancel|func|A cancel callback, which receives `values` as the first argument.||
36
36
|onStateUpdate|func|A function which will be called with every form update, i.e. `({ values }) => setValues(values)`||
37
37
|disableSubmit|array of strings|You can specify a form attributes (see [here](https://final-form.org/docs/final-form/types/FormState)) which will make the submit button disabled. |[]|
38
38
|initialValues|object|An object of fields names as keys and values as their values.||
@@ -42,6 +42,30 @@ Form Renderer provides a lot of customization via props.
42
42
|uiSchema|object|Use when you need to use mozilla schema.|{ }|
43
43
|<RouterLinkhref="/renderer/validators"><Link>validate</Link></RouterLink>|func|A function which receives all form values and returns an object with errors.||
44
44
45
+
### Schema
46
+
47
+
The root object of the schema represents the <RouterLinkhref="/renderer/component-mapping#formwrapper"><Link>Form</Link></RouterLink> component, which accepts only these three props:
48
+
49
+
|Prop|Type|Description|
50
+
|----|:--:|----------:|
51
+
|label, title|node|<RouterLinkhref="/renderer/component-mapping#title"><Link>Title</Link></RouterLink> of the form. Optional.|
52
+
|description|node|<RouterLinkhref="/renderer/component-mapping#description"><Link>Description</Link></RouterLink> of the form. Optional.|
53
+
|fields|array of objects|<RouterLinkhref="/renderer/component-api"><Link>Components</Link></RouterLink> of the form. Required!|
0 commit comments