Ionic V4 ion-select default model value not showed
See original GitHub issueHello Ionic Team
I have this code:
<ion-grid>
<ion-row align-items-center>
<ion-col size="3"><ion-label>Objekt</ion-label></ion-col>
<ion-col size="9">
<ion-select [(ngModel)]="currentObjektId" placeholder="Objekt Auswahl" class="myCustomSelect" (ionChange)="changeObjekt()" multiple="false" okText="OK" cancelText="abbrechen" [interfaceOptions]="selectOptions">
<ion-select-option *ngFor="let o of objekte" [value] = "+(o.id)">{{o.kurzname}}</ion-select-option>
</ion-select>
</ion-col>
</ion-row>
</ion-grid>
I load currentObjektId (number) and the select does not show the element, however when one clicks the select and the object is already selected.
objekte : { id: number,kurzname: string, online_id: number, admin: number,bilder: number }[];
Ionic Information:
ionic (Ionic CLI) : 4.10.2 (C:\Users-—\AppData\Roaming\npm\node_modules\ionic) Ionic Framework : @ionic/angular 4.0.0-rc.1 @angular-devkit/build-angular : 0.11.4 @angular-devkit/schematics : 7.1.4 @angular/cli : 7.1.4 @ionic/angular-toolkit : 1.2.3
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1) Cordova Platforms : android 7.1.4 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.0.0, (and 23 other plugins)
System:
Android SDK Tools : 26.1.1 (C:\Users-—\AppData\Local\Android\android-sdk) NodeJS : v8.9.4 (C:\Program Files\nodejs\node.exe) npm : 4.6.1 OS : Windows 10
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (2 by maintainers)
Top GitHub Comments
Hello. No, my Repo works fine, I mean, without the Problem. I thought that maybe someone else could uses the Repo to introduce his Code and reproduces the problem.
Am Do., 7. März 2019 um 15:22 Uhr schrieb Liam DeBeasi < notifications@github.com>:
Thanks for the issue! This issue is being closed due to the lack of a reply. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Thank you for using Ionic!