Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7414] TiAPI: UI.PickerRow selected property does not work on iOS and Android

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2017-05-02T22:04:20.000+0000
Affected Version/sRelease 1.8.0.1
Fix Version/sn/a
ComponentsTiAPI
Labelsn/a
ReporterPaul Dowsett
AssigneeIngo Muschenetz
Created2012-01-25T19:51:58.000+0000
Updated2017-05-02T22:04:20.000+0000

Description

Property

The [Titanium.UI.PickerRow.selected](http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.PickerRow.selected-property.html) property does not currently work for either iOS or Android, despite being used in the KitchenSink. Thus, determine the future of this property, and raise platform tickets to address the issues if necessary. As a workaround, use the picker method, [Titanium.UI.Picker.setSelectedRow](http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.Picker.setSelectedRow-method.html).

Test Case

Ti.UI.backgroundColor = 'white';
var win = Ti.UI.createWindow({
	exitOnClose: true,
	layout: 'vertical'
});

var picker = Ti.UI.createPicker({
	top:50
});
var data = [];
data[0]=Ti.UI.createPickerRow({title:'Bananas'});
data[1]=Ti.UI.createPickerRow({title:'Strawberries', selected: true});  // selected property does not work
data[2]=Ti.UI.createPickerRow({title:'Mangos'});
data[3]=Ti.UI.createPickerRow({title:'Grapes'});
picker.add(data);
picker.selectionIndicator = true;
win.add(picker);
win.open();
// picker.setSelectedRow(0, 2, false); // uncomment to test on Android. This must be wrapped in setTimeout() on iOS, as it won't take effect unless the picker has been rendered

Comments

  1. Lee Morris 2017-05-02

    Resolving ticket as Invalid as there is now a new version of Kitchen Sink available and we no longer support the version which relates to this ticket.

JSON Source