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: docs/api/FormGenerator.md
+10-26Lines changed: 10 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
2
2
# FormGenerator
3
-
A react component which generates a new tree of control objects or can be used with an existing control tree & assign the components to the controls.
3
+
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.
4
4
5
5
## How it works
6
-
- It creates a new instance of [FormControl](FormControl.md) if the `name` prop is defined.
7
-
- If a `name` prop is defined then it means that the control has to be added in an already existing parent control ( [FormGroup](FormGroup.md)/ [FormArray](FormArray.md)) i.e the parent control must be present.
8
-
-If a control with the same name is already present in the parent control then it just returns the same otherwise it'll create a new instance of [FormControl](FormControl.md) class.
9
-
- You can define a parent control either by passing the `parent`prop or using the component as a child of the `FieldArray` or `FieldGroup` component.
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`.
9
+
- You can define a parent control by passing the `parent`property.
10
10
- If a `control` prop is defined then it just returns the same.
0 commit comments