We Can do this
To bind the selected programme
objects correctly, update the mat-option
as follows:
<mat-select class="form-control" placeholder="Funding Programmes" formControlName="Programme" multiple>
<mat-option *ngFor="let programme of programmeList" [value]="programme">
{{programme.Description}}
</mat-option>
</mat-select>
This ensures the selected Programme
objects are stored as an array in the form control.
To fix the issue of the dropdown appearing behind the modal, add this CSS:
::ng-deep .mat-select-panel {
z-index: 1050 !important;
}
This ensures the dropdown is displayed above the modal.
mat-option
to individual programme
objects to save them correctly.::ng-deep
to adjust the dropdown's z-index
so it appears on top of the modal.Hope this solves your Question