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
FieldArray supports [final form notation](https://final-form.org/docs/final-form/field-names).
19
+
20
+
Prefix is made by `name` of the `FIELD-ARRAY` component.
21
+
22
+
Nested components can have custom names, then the values are saved as an array of objects:
23
+
24
+
```jsx
25
+
{
26
+
fieldArrayName: [
27
+
{
28
+
nestedName:'VALUE 1'
29
+
},
30
+
{
31
+
nestedName:'VALUE 2'
32
+
},
33
+
...
34
+
]
35
+
}
36
+
```
37
+
38
+
You don't need to name the nested components, then the values are saved as an array of values:
39
+
40
+
```jsx
41
+
{
42
+
fieldArrayName: [
43
+
'VALUE 1',
44
+
'VALUE 2',
45
+
...
46
+
]
47
+
}
48
+
```
49
+
16
50
### Validators
17
51
18
52
You can use user a few provided validators (you can also use your <NavLinkto='/renderer/validators'>own</NavLink>.)
@@ -33,7 +67,7 @@ PF4 component mapper provides an experimental implementation of PF4 field arrays
33
67
|label|`node`|Label of the array.|
34
68
|description|`node`|Description of the array.|
35
69
|fields|`array`|A group of fields, which are being added to the array.|
36
-
|defaultItem|`any`|Default item which is inserted into a newly created fields group.|
70
+
|defaultItem|`any`|Default item which is inserted into a newly created fields group. If you have nested names, don't forget you need to insert an object!|
37
71
|minItems|`number`|Remove button is disabled, if the length of the array is equal or smaller.|
38
72
|maxItems|`number`|Add button is disabled, if the length of the array is equal or bigger.|
39
73
|noItemsMessage|`node`|A message which is shown, when there are no items in the array.|
0 commit comments