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/action-mapper.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,12 @@
1
1
import Grid from '@material-ui/core/Grid'
2
-
import RouterLink from 'next/link';
3
-
import Link from '@material-ui/core/Link';
4
2
import ListOfContents from '../../src/helpers/list-of-contents';
5
3
6
4
<Gridcontaineritem>
7
5
<Griditemxs={12}md={10}>
8
6
9
7
# Action Mapper
10
8
11
-
The <RouterLinkhref="/renderer/renderer-api#optionalprops"><Linkhref="/renderer/renderer-api#optionalprops">ActionMapper</Link></RouterLink> allows you to map schema props to functions. This is useful when your schema is not written in JavaScript and you cannot use function inside of it, especially for schemas stored in databases.
9
+
The [ActionMapper](/renderer/renderer-api#optionalprops) allows you to map schema props to functions. This is useful when your schema is not written in JavaScript and you cannot use function inside of it, especially for schemas stored in databases.
Copy file name to clipboardExpand all lines: packages/react-renderer-demo/src/app/pages/renderer/component-api.md
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,4 @@
1
1
import Grid from '@material-ui/core/Grid'
2
-
import RouterLink from 'next/link';
3
-
import Link from '@material-ui/core/Link';
4
2
5
3
import ListOfContents from '../../src/helpers/list-of-contents';
6
4
import ExampleLink from '@docs/components/common/example-link';
@@ -55,7 +53,7 @@ All those components provides a shared group of props:
55
53
|isRequired|boolean|Is the field required?|
56
54
|isDisabled|boolean|Is the field disabled?|
57
55
|isReadOnly|boolean|Is the field readOnly?|
58
-
|initialValue|custom|There are two ways how to set initial values in the form: you can use either the <RouterLinkhref="/renderer/renderer-api"><Linkhref="/renderer/renderer-api">initialValues</Link></RouterLink> prop for the whole form or you can set the value in the schema for each field separately. For more information, please see [here](https://final-form.org/docs/react-final-form/types/FieldProps#initialvalue).|
56
+
|initialValue|custom|There are two ways how to set initial values in the form: you can use either the [initialValues](/renderer/renderer-api) prop for the whole form or you can set the value in the schema for each field separately. For more information, please see [here](https://final-form.org/docs/react-final-form/types/FieldProps#initialvalue).|
59
57
60
58
## Text field
61
59
@@ -187,7 +185,7 @@ Wizard step <br/>
187
185
|----|:--:|----------:|
188
186
|title|node/string|Step title|
189
187
|name|string, number|Uniq name of the step|
190
-
|nextStep|object/name of next step|See <RouterLinkhref="/component-example/wizard"><Linkhref="/component-example/wizard">wizard documentation</Link></RouterLink>|
188
+
|nextStep|object/name of next step|See [wizard documentation](/component-example/wizard)|
Copy file name to clipboardExpand all lines: packages/react-renderer-demo/src/app/pages/renderer/field-array.md
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,3 @@
1
-
import RouterLink from 'next/link';
2
-
import Link from '@material-ui/core/Link';
3
1
import Grid from '@material-ui/core/Grid'
4
2
import RawComponent from '@docs/raw-component';
5
3
@@ -10,7 +8,7 @@ import ListOfContents from '../../src/helpers/list-of-contents';
10
8
11
9
# Field Array Provider
12
10
13
-
Simillarly to <RouterLinkhref='/renderer/field-provider'><Linkhref='/renderer/field-provider'>FieldProvider</Link></RouterLink> Data driven forms provide an option how to inlude <ahref='https://github.com/final-form/react-final-form-arrays'>React Final Form Arrays</a> in your form. Please visit their documentation to learn about functionality.
11
+
Simillarly to [FieldProvider](/renderer/field-provider)Data driven forms provide an option how to inlude [React Final Form Arrays](https://github.com/final-form/react-final-form-arrays) in your form. Please visit their documentation to learn about functionality.
14
12
15
13
## Using FieldArray
16
14
@@ -58,7 +56,7 @@ You don't need to name the nested components, then the values are saved as an ar
58
56
59
57
# Validators
60
58
61
-
You can use user a few provided validators (you can also use your <RouterLinkhref='/renderer/validators'><Linkhref='/renderer/validators'>own</Link></RouterLink>.)
59
+
You can use user a few provided validators (you can also use your [own](/renderer/validators).)
Copy file name to clipboardExpand all lines: packages/react-renderer-demo/src/app/pages/renderer/form-template.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,5 @@
1
1
import Grid from '@material-ui/core/Grid'
2
2
import RawComponent from '@docs/raw-component';
3
-
import RouterLink from 'next/link';
4
-
import Link from '@material-ui/core/Link';
5
3
6
4
import ListOfContents from '../../src/helpers/list-of-contents';
7
5
@@ -37,7 +35,7 @@ With using `useFormApi` hook you can get access to all form information and func
37
35
38
36
## Customize form buttons
39
37
40
-
You can customize form buttons in your <RouterLinkhref='/renderer/renderer-api#requiredprops'><Linkhref='/renderer/renderer-api#requiredprops'>FormTemplate</Link></RouterLink> component
38
+
You can customize form buttons in your [FormTemplate](/renderer/renderer-api#requiredprops) component
Copy file name to clipboardExpand all lines: packages/react-renderer-demo/src/app/pages/renderer/initialize-mount.md
+3-5Lines changed: 3 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,4 @@
1
1
import Grid from '@material-ui/core/Grid'
2
-
import RouterLink from 'next/link';
3
-
import Link from '@material-ui/core/Link';
4
2
import RawComponent from '@docs/raw-component';
5
3
6
4
import ListOfContents from '../../src/helpers/list-of-contents';
@@ -14,7 +12,7 @@ Data Driven Forms provides a way how you can easily initialized a field when the
14
12
15
13
Just pass a `initializeOnMount` prop and set it to `true`.
16
14
17
-
The field will use the `initialValue` set in the schema (<RouterLinkhref="/renderer/component-api#formgroupwrappedcomponents"><Linkhref="/renderer/component-api#formgroupwrappedcomponents">initialValue</Link></RouterLink>) or in the renderer (<RouterLinkhref="/renderer/renderer-api#optionalprops"><Linkhref="/renderer/renderer-api#optionalprops">initialValues</Link></RouterLink>).
15
+
The field will use the `initialValue` set in the schema ([initialValue](/renderer/component-api#formgroupwrappedcomponents)) or in the renderer ([initialValues](/renderer/renderer-api#optionalprops)).
18
16
19
17
`initialValue` has higher priority than a value from `initialValues`.
20
18
@@ -32,13 +30,13 @@ The field will use the `initialValue` set in the schema (<RouterLink href="/rend
32
30
33
31
## When to use it?
34
32
35
-
This feature comes handy if you need change a value when an user traverses a form, which shows and hides fields, and the value is not set by the user. Very useful case is used it wizard forms, where you can set different value for the same input according the way the user went in the wizard form by using this option combined with <RouterLinkhref="/renderer/component-api#commonpropsforallformfields"><Linkhref="/renderer/component-api#commonpropsforallformfields">hideField</Link></RouterLink> prop.
33
+
This feature comes handy if you need change a value when an user traverses a form, which shows and hides fields, and the value is not set by the user. Very useful case is used it wizard forms, where you can set different value for the same input according the way the user went in the wizard form by using this option combined with [hideField](/renderer/component-api#commonpropsforallformfields) prop.
36
34
37
35
<RawComponentsource="initialize-mount" />
38
36
39
37
## Clear the value
40
38
41
-
If you need clear the value after unmounting, you can do it by using <RouterLinkhref="/renderer/unmounting"><Linkhref="/renderer/unmounting">clearOnUnmount</Link></RouterLink>.
39
+
If you need clear the value after unmounting, you can do it by using [clearOnUnmount](/renderer/unmounting).
Copy file name to clipboardExpand all lines: packages/react-renderer-demo/src/app/pages/renderer/renderer-api.md
+9-11Lines changed: 9 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,3 @@
1
-
import RouterLink from 'next/link';
2
-
import Link from '@material-ui/core/Link';
3
1
import Grid from '@material-ui/core/Grid'
4
2
5
3
import ListOfContents from '../../src/helpers/list-of-contents';
@@ -16,33 +14,33 @@ Form Renderer provides a lot of customization via props.
16
14
17
15
|Prop|Type|Description|
18
16
|----|:--:|----------:|
19
-
|<RouterLinkhref="/renderer/component-mapping"><Linkhref="/renderer/component-mapping">componentMapper</Link></RouterLink>|object|Defines types of form field components. Field components can change the state of the form.|
20
-
|<RouterLinkhref="/renderer/form-template"><Linkhref="/renderer/component-mapping">FormTemplate</Link></RouterLink>|Component|Components which defines a template of the form. This component receives two props from the renderer: `formFields` and `schema`. `formFields` is the content of the form. You should wrap this content into your `<form>` component and add form buttons.|
17
+
|[componentMapper](/renderer/component-mapping)|object|Defines types of form field components. Field components can change the state of the form.|
18
+
|[FormTemplate](/renderer/component-mapping)|Component|Components which defines a template of the form. This component receives two props from the renderer: `formFields` and `schema`. `formFields` is the content of the form. You should wrap this content into your `<form>` component and add form buttons.|
21
19
|onSubmit|func|A submit callback which receives two arguments: `values` and `formApi`.|
22
20
|schema|object|A schema which defines structure of the form.|
23
21
24
22
## Optional props
25
23
26
24
|Prop|Type|Description|Default|
27
25
|----|:--:|----------:|------:|
28
-
|<RouterLinkhref="/renderer/action-mapper"><Linkhref="/renderer/action-mapper">actionMapper</Link></RouterLink>|object|Action mapper allows to map props to functions.||
29
-
|<RouterLinkhref="/renderer/unmounting"><Linkhref="/renderer/unmounting">clearOnUnmount</Link></RouterLink>|bool|Will clear values of unmounted components. You can also set this to specific component in the form schema.|false|
30
-
|<RouterLinkhref="/renderer/cleared-value"><Link>clearedValue</Link></RouterLink>|any|Value that will be set to field with **initialValue** after deleting it. Useful for forms while editing.|undefined|
26
+
|[actionMapper](/renderer/action-mapper)|object|Action mapper allows to map props to functions.||
27
+
|[clearOnUnmount](/renderer/unmounting)|bool|Will clear values of unmounted components. You can also set this to specific component in the form schema.|false|
28
+
|[clearedValue](/renderer/cleared-value)|any|Value that will be set to field with **initialValue** after deleting it. Useful for forms while editing.|undefined|
31
29
|onReset|func|A reset callback. You don't need to manually clear the form values!||
32
30
|onCancel|func|A cancel callback, which receives `values` as the first argument.||
33
31
|debug|func|A function which will be called with every form update, i.e. `({ values }) => setValues(values)`, please take a look [here](https://final-form.org/docs/react-final-form/types/FormProps#debug)||
34
32
|initialValues|object|An object of fields names as keys and values as their values.||
35
33
|subscription|object|You can pass your own [subscription](https://final-form.org/docs/react-final-form/types/FormProps#subscription), which will be added to default settings.|`{ pristine: true, submitting: true, valid: true }`|
36
-
|<RouterLinkhref="/renderer/validators"><Linkhref="/renderer/validators">validate</Link></RouterLink>|func|A function which receives all form values and returns an object with errors.||
37
-
|<RouterLinkhref="/renderer/validators#validatormapper"><Linkhref="/renderer/validators#validatormapper">validatorMapper</Link></RouterLink>|object|A mapper containing custom validators, it's automatically merged with the default one.||
34
+
|[validate](/renderer/validators)|func|A function which receives all form values and returns an object with errors.||
35
+
|[validatorMapper](/renderer/validators#validatormapper)|object|A mapper containing custom validators, it's automatically merged with the default one.||
38
36
39
37
# Schema
40
38
41
-
The root object of the schema represents the <RouterLinkhref="/renderer/component-mapping#formwrapper"><Linkhref="/renderer/component-mapping#formwrapper">Form</Link></RouterLink> component, that needs only this prop:
39
+
The root object of the schema represents the Form component, that needs only this prop:
42
40
43
41
|Prop|Type|Description|
44
42
|----|:--:|----------:|
45
-
|fields|array of objects|<RouterLinkhref="/renderer/component-api"><Linkhref="/renderer/component-api">Components</Link></RouterLink> of the form. Required!|
43
+
|fields|array of objects|[Components](/renderer/component-api) of the form. Required!|
46
44
47
45
You can use all other props in your `formTemplate` components.
Copy file name to clipboardExpand all lines: packages/react-renderer-demo/src/app/pages/renderer/validators.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,5 @@
1
1
import Grid from '@material-ui/core/Grid'
2
2
import RawComponent from '@docs/raw-component';
3
-
import RouterLink from 'next/link';
4
-
import Link from '@material-ui/core/Link';
5
3
6
4
import ListOfContents from '../../src/helpers/list-of-contents';
7
5
@@ -60,7 +58,7 @@ If you do not want to trigger the async validator after every stroke, you can us
60
58
61
59
# Custom validator mapper
62
60
63
-
If you need to expand default Data Driven Forms validator types, you can use <RouterLinkhref="/renderer/renderer-api#optionalprops"><Linkhref="/renderer/renderer-api#optionalprops">validatorMapper</Link></RouterLink>.
61
+
If you need to expand default Data Driven Forms validator types, you can use [validatorMapper](/renderer/renderer-api#optionalprops).
Copy file name to clipboardExpand all lines: packages/react-renderer-demo/src/app/src/doc-components/pf4-dual-list.md
+1-4Lines changed: 1 addition & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,8 @@
1
-
import RouterLink from 'next/link';
2
-
import Link from '@material-ui/core/Link';
3
-
4
1
This a custom component with a custom design. Things can be changed, after official PF4 release.
5
2
6
3
**Props**
7
4
8
-
Dual list select is wrapped in a form group, so it accepts all <RouterLinkhref="/renderer/component-api#formgroupwrappedcomponents"><Linkhref="/renderer/component-api#formgroupwrappedcomponents">form group props</Link></RouterLink>.
5
+
Dual list select is wrapped in a form group, so it accepts all [form group props](/renderer/component-api#formgroupwrappedcomponents).
0 commit comments