Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49526

Refresh ionic select options

$
0
0

Hello,
I have an ionic-select with some ionic-select-options that I add through an array that I create through a call to the server. So far everything ok, I can create the select in this way

<ion-select formControlName="exams" interface="action-sheet">

              <ion-select-option value="all">All</ion-select-option>

              <ion-select-option *ngFor="let e of exams" value="{{e.id}}">{{e.name}}</ion-select-option>

            </ion-select>

Now my question is, how do I refresh the options when I add a new element to the array?
If I do it this way
this.exams = getExams();

I can see the new information only by clicking on the select, but the new values ​​do not update immediately.
For example, if I delete the old array of exams and create one with new values, the old values ​​remain in the select until I click on the select.

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 49526

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>