Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49425

How to listen to 'ionPickerColChange' event

$
0
0

I have 3 columns in a picker. When the first column has been changed, the values for second and third column need to be updated (the same goes to the second column). I tried to listen to ionPickerColChange as below but it’s not working.

async openPicker(){
    const options = {
        buttons: [ ... ],
        columns:[
            { name: 'col_1', options: this.col_1 },
            { name: 'col_2', options: this.col_2 },
            { name: 'col_3', options: this.col_3 }
        ]
    };
    const picker = await pickerController.create(options);
    picker.addEventListener('ionPickerColChange', async event => {
        //update second and third column if first column has changed
        //update third column if second column has changed
    });
    picker.present();
}

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49425

Trending Articles



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