# MUK FORM ARRAY BUILDER

## Usage

```html

<lib-muk-form-array-builder
        [arrayController]="arrayController"
        [formGroup]="formGroup"
        [label]="label"
        [fields]="fields"
></lib-muk-form-array-builder>
```

```typescript
import {Component} from '@angular/core';

@Component({
    selector: 'app-root',
    templateUrl: './app.component.html'
})
export class AppComponent {
    public arrayController: FormArrayController;
    public formGroup: FormGroup;
    public label: string;
    public fields: IFormControl<Field>[];

    constructor() {
        this.arrayController = new FormArrayController();
        this.formGroup = new FormGroup({});
        this.label = 'Fields';
        this.fields = [
            {
                controller: {
                    name: "category",
                    controller: this._fb.control(payload?.category, [
                        Validators.required,
                    ]),
                },
                containerStyle: "mb-3",
                placeholder: "selectGender",
                type: formControlType.select,
                controllerSpecification: <IDropDownInput>{
                    options: [
                        {
                            id: 1,
                            name: "test"
                        }
                    ],
                    key: "id",
                    value: "name",
                    change: () => {
                    },
                },
                isAutofocus: false,
                isAutocomplete: false,
                columnSize: 12,
                translateLangType: null,
                controllerStyle: null,
            }
        ];
    }


}
```

### Properties

| Name            | Type                  | Description      |
|-----------------|-----------------------|------------------|
| arrayController | FormArrayController   | Array controller |
| formGroup       | FormGroup             | Form group       |
| label           | string                | Label            |
| fields          | IFormControl<Field>[] | Fields           |
