Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 231200

Ionic 4 ion-select pre select value

$
0
0

Ok I finally got it to work. I was missing the selectedText attribute. Now it works as expected

<ion-select [(ngModel)]="selectedCodeValue" name="selectCode" 
  multiple="false" placeholder="Tap to select.." [selectedText]="selectedCodeValue"
  (ionChange)="codeSelected()" required >
        <ion-select-option *ngFor="let code of availableCodes" value="{{code.id}}">
          {{code.id}} -  {{code.description}}
        </ion-select-option>
  </ion-select>

Viewing all articles
Browse latest Browse all 231200

Trending Articles



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