Hi,
I am learning ionic framework. Created a simple user registration screen with gender as ionic-selectable control. able to save the value to database. However, in the edit mode, could not select the saved gender value in the ionic-selectable control.
<ionic-selectable
[(ngModel)]=“service.formData.gender” name=“gender” #gender
[items]=“comService.genderList”
itemValueField=“genderCode”
itemTextField=“genderName”
(onChange)=“GenderChange($event)”
[canClear]=“true”
[canSearch]=“true”>
The below function return in the user-details.service.ts is used to load the selected row value into the corresponding fields. All text fields are assigned with the values using the two way binding expect ionic-selectable.
LoadForEdit(selectedRecord:UserDetails){
this.formData = selectedRecord;
}
1 post - 1 participant