question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PickerController doesn't show correctly

See original GitHub issue

Bug Report

Ionic version:

[x] 4.x

Current behavior:

The second time the PickerController shows the options are not showing correctly.

Expected behavior:

It should show always the right options pickercontroller

Steps to reproduce:

Related code:

Other information:

Ionic info:

Ionic:

   ionic (Ionic CLI)             : 4.10.3 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.0.2
   @angular-devkit/build-angular : 0.13.4
   @angular-devkit/schematics    : 7.3.4
   @angular/cli                  : 7.3.4
   @ionic/angular-toolkit        : 1.4.0

System:

   NodeJS : v10.15.1 (/usr/local/bin/node)
   npm    : 6.8.0
   OS     : macOS Mojave

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:47 (4 by maintainers)

github_iconTop GitHub Comments

26reactions
a7md0commented, Jul 19, 2019

@michaelins

async numberPicker() {
    const picker = await this.pickerCtrl.create({
      buttons: [
        {
          text: 'Cancel',
          role: 'cancel'
        },
        {
          text: 'Confirm',
          handler: (data) => {
            console.log(data.number);
          }
        }
      ],
      columns: [{
        name: 'number',
        options: [
          { text: 'One', value: 1 },
          { text: 'Two', value: 2 },
        ]
      }]
    });

    picker.columns[0].options.forEach(element => {
      delete element.selected;
      delete element.duration;
      delete element.transform;
    });

    picker.present();
  }
17reactions
MengLu2016commented, Jul 2, 2019

it is the problem of changed columns.options with dynamically set options, when click the picker without changing the selectedIndex twice, the columns.options will add three attribute of selected/duration/transform, just delete it. columns.options.forEach(element => { delete element.selected; delete element.duration; delete element.transform; });

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is picker view not displaying attributed string?
The picker view doesn't show the titles like they are intended for the formatting. It looks like all the attributes doesn't all show....
Read more >
iphone - UIImagePickerControllerDelegate not responding properly ...
without a problem. I have another app using the new didFinishPickingMediaWithInfo API in another app, and the method is never getting called by...
Read more >
ImagePicker - Expo Documentation
ImagePicker. expo-image-picker provides access to the system's UI for selecting images and videos from the phone's library or taking a photo with the ......
Read more >
How to Use UIImagePickerController for a Camera and Photo ...
In the properties change the View Mode to AspectFit to properly size the ... The star of our show the UIImagePickerController is missing....
Read more >
Picking a Photo in iOS 14 - BiTE Interactive
The UIImagePickerController Dance · Make sure the source type you intend to use, which in this case would be . · Create the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found