Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

picker change event not firing for first time in Titanium

$
0
0

I am using picker in my Tiatnium Application.

Picker data is loading from json response.I first store API data in Temporary array and then adding data to picker.

The problem is when I click picker elements for the first time the change event doesn't get fired. After first click is done then if I click on any element it works as expected.

Here is the small code snippet of it

for (var i = sorted.length - 1; i >= 0; i--) {
            pickerData[i] = Ti.UI.createPickerRow({
                title : sorted[i],
 
        });
            Ti.API.info('From sorted ' + i + sorted[i]);
        }
$.picker.add(pickerData);
$.picker.addEventListener('change', function(e) {
            countRow = 0;
            data.length = 0;
            showfilterData(e.row.title, jsonResponse);
        });
So what is the problem.

Can anyone explain?


Viewing all articles
Browse latest Browse all 8068

Trending Articles



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