Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ionic 4] ion-select not working with numbers #15200

Closed
meta0102 opened this issue Aug 16, 2018 · 1 comment
Closed

[Ionic 4] ion-select not working with numbers #15200

meta0102 opened this issue Aug 16, 2018 · 1 comment
Assignees

Comments

@meta0102
Copy link

meta0102 commented Aug 16, 2018

Ionic:

   ionic (Ionic CLI)          : 4.0.6 (C:\Users\xxx\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework            : @ionic/angular 4.0.0-beta.2
   @angular-devkit/core       : 0.7.3
   @angular-devkit/schematics : 0.7.3
   @angular/cli               : 6.1.3
   @ionic/ng-toolkit          : 1.0.6
   @ionic/schematics-angular  : 1.0.4

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : none

System:

   Android SDK Tools : 26.1.1
   NodeJS            : v8.11.3 (C:\Program Files\nodejs\node.exe)
   npm               : 6.3.0-next.0
   OS                : Windows 10

Environment:

   ANDROID_HOME : C:\Users\xxx\AppData\Local\Android\Sdk
<ion-item>
              <ion-label position="floating" color="primary">License</ion-label>
              <ion-select [(ngModel)]="license.id" formControlName="selectedlicense">
                <ion-select-option *ngFor="let lic of licenses" [value]="lic.id">{{lic.title}}</ion-select-option>
              </ion-select>
            </ion-item>
licenses = [
        {id: 1, title: 'test123'}
    ]
    license = {
        id: 1
    }

ion-select does not select the the active item if the model is a number
if you change the ion-select model from 1 to '1' (string) all is working fine

license = {
        id: '1'
    }
@ionitron-bot ionitron-bot bot added triage and removed triage labels Aug 16, 2018
@manucorporat manucorporat self-assigned this Aug 24, 2018
@ionitron-bot
Copy link

ionitron-bot bot commented Sep 23, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. 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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants