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
A react component which generates a tree of control objects or can be append to an existing control tree & renders the associated React components in the same order.
3
+
A react component which generates a tree of control objects & render the UI by keeping the same order in which the controls have been defined in `fieldConfig`.
4
4
5
5
## How it works
6
-
- It creates a new instance of [FormGroup](FormGroup.md) ( if `controls` property is an object ) or [FormArray]
7
-
(FormArray.md) ( if `controls` property is an array ).
8
-
- It renders the UI of the form according to associated components to the controls by keeping the same order in which they have been defined in `fieldConfig`.
6
+
- It creates a new instance of [FormGroup](FormGroup.md) ( if `controls` property is an object ) or
7
+
[FormArray](FormArray.md) ( if `controls` property is an array ) if the `control` property is not supplied.
8
+
- It renders the form UI according to the control-component mapping by keeping the same order in which they have been
9
+
defined in `fieldConfig`.
9
10
- You can define a parent control by passing the `parent` property.
10
11
- If a `control` prop is defined then it just returns the same.
11
12
12
13
13
14
## Props
15
+
##
16
+
```ts
17
+
onMount: (form:FormGroup|FormArray) =>void
18
+
```
19
+
A function callback called when a form has been rendered, the basic use case is to save the form instance for further uses.
20
+
##
21
+
```ts
22
+
onUnmount: () =>void
23
+
```
24
+
A function callback called when a form has been unmounted.
25
+
##
26
+
```ts
27
+
fieldConfig: {[key: string]: any}
28
+
```
29
+
Field config has a set of properties which are required for the form configuration.
0 commit comments