Skip to content

bug: picker column prevSelect is always the same as selectedIndex #21764

Closed

Description

@ryaa

Bug Report

Ionic version:

[ ] 4.x
[x] 5.x

Current behavior:

ionPickerColChange picker event handler receives change details and its property prevSelected value is always the same as selectedIndex prop value;

Expected behavior:

I assume that prevSelected should reflect the previously selected index and selectedIndex should reflect the currently selected index and those should be different if there has been a changed made.

Steps to reproduce:

  1. open the link to stackblitz (see below)
  2. click/tap OPEN PICKER button
  3. change the value in the first column
    Note that in the console the prevSelected shown is the same as selectedIndex

Related code:
See https://stackblitz.com/edit/ionic-angular-v5-dbgcak?file=src%2Fapp%2Fapp.component.ts

Ionic info:

Ionic:

   Ionic CLI                     : 6.9.2 (/Users/alexryltsov/.nvm/versions/node/v12.16.3/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.1.1
   @angular-devkit/build-angular : 0.901.7
   @angular-devkit/schematics    : 9.1.7
   @angular/cli                  : 9.1.7
   @ionic/angular-toolkit        : 2.2.0

Capacitor:

   Capacitor CLI   : 2.1.1
   @capacitor/core : 2.1.1

Utility:

   cordova-res : not installed
   native-run  : not installed

System:

   NodeJS : v12.16.3 (/Users/alexryltsov/.nvm/versions/node/v12.16.3/bin/node)
   npm    : 6.14.5
   OS     : macOS Catalina

Activity

  1. added
    package: core
    type: bug
    on Jul 16, 2020
  2. added
    type: bug
    and removed
    type: bug
    on Apr 21, 2023
  3. added a commit that references this issue on May 16, 2023
    9dc126d
  4. thetaPC commented on May 16, 2023

    @thetaPC
    Contributor

    Thanks for the issue! This has been resolved via PR #27458 and will be available in an upcoming release of Ionic.

  5. thetaPC commented on May 17, 2023

    @thetaPC
    Contributor

    The fix has been released through v7.0.7!

  6. added a commit that references this issue on May 22, 2023
    2209425
  7. ionitron-bot commented on Jun 16, 2023

    @ionitron-bot

    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.

  8. locked and limited conversation to collaborators on Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: coretype: bug

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions