Hi, I’ve a select picker in a popup which is populated via an array. When opening the popup I want to show the previous selected entry as a preselect with the [defaultSelection]
.
<mbsc-select [(ngModel)]="audit.responsible" [data]="company.users?.auditors" [defaultSelection]="audit.responsible">
</mbsc-select>
The “company.users.auditors”-data is structured this way:
{ text: 'name', value: {name:'...', email:'...'} }
(I want to pass an object)
The problem is now, that if I save my selection, close the popup and reopen the popup to edit my data it is always the first entry of company.users.auditors
preselected. In angular/ionic the [compareWith]
gets the work with the objects done. Is there a way to deal with objects and the mbsc-select
?