**Everything is working fine except for one error in the console. How can I remove this error? Can anyone please help me? Save, Edit, and searching are working perfectly fine. **
public campaignCategoryFormGroup$: FormGroup = this.fb.group({
// 'categoryGroupId': [{ value: '', disabled: true }, [
// Validators.required
// ]],
'categoryId': [[], [Validators.required]],
'subCategoryId': [[], [Validators.required]],
});
public campaignCategoryForm: FormArray = this.fb.array([
this.campaignCategoryFormGroup$
]);
<div class="col s4">
<app-mat-select-search multiple (selectionChange)="onSelectCategory($event.value, true, false)"
[label]="'CATEGORY_ID' | translate: lang" [list]="categoryList" valueField="categoryId"
[myFormControl]="campaignService.campaignCategoryFormGroup$.controls['categoryId']"
[requiredMsg]="'REQUIRED' | translate:lang"
[searchPlaceholder]="'CATEGORY_SEARCH_PLACEHOLDER' | translate: lang" [isInactive]="true" [isRequired]="true"
[noResultsLabel]="'CATEGORY_SEARCH_NOT_FOUND' | translate: lang" displayField="categoryName">
</app-mat-select-search>
</div>
<div class="col s4">
<app-mat-select-search multiple [label]="'SUB_CATEGORY_ID' | translate: lang" [list]="subCategoryList"
valueField="subCategoryId"
[myFormControl]="campaignService.campaignCategoryFormGroup$.controls['subCategoryId']"
[requiredMsg]="'REQUIRED' | translate:lang"
[searchPlaceholder]="'SUB_CATEGORY_GROUP_SEARCH_PLACEHOLDER' | translate: lang" [isInactive]="true"
[isRequired]="true" [noResultsLabel]="'SUB_CATEGORY_GROUP_SEARCH_NOT_FOUND' | translate: lang"
displayField="subCategoryName">
</app-mat-select-search>
</div>
https://i.sstatic.net/MoX4P.png
core.js:1673 ERROR Error: Uncaught (in promise): Error: Value must be an array in multiple-selection mode. Error: Value must be an array in multiple-selection mode.