Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25245] Windows: Calling picker.reloadColumn removes all other columns

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-09-25T11:54:31.000+0000
Affected Version/sRelease 6.1.2, Release 7.0.0, Release 6.2.0
Fix Version/sRelease 6.3.0
ComponentsWindows
Labelsn/a
ReporterEwan Harris
AssigneeKota Iguchi
Created2017-09-07T13:35:21.000+0000
Updated2017-10-09T15:10:59.000+0000

Description

Description

When calling picker.reloadColumn, if there are multiple columns all other columns are removed
var _window = Ti.UI.createWindow();
var names = ['Joanie', 'Mickey', 'Jean-Pierre', 'Gustav', 'Raul', 'Mimi', 'Emily', 'Sandra', 'Carrie', 'Chachi'];
var verbs = ['loves', 'likes', 'visits', 'loathes', 'waves to', 'babysits', 'accompanies', 'teaches', 'announces', 'supports', 'knows', 'high-fives'];

var column1 = Ti.UI.createPickerColumn();
for (var i = 0; i < names.length; i++) {
    column1.addRow(Ti.UI.createPickerRow({title: names[i]}));
}
var column2 = Ti.UI.createPickerColumn();

for (i = 0; i < verbs.length; i++) {
    column2.addRow(Ti.UI.createPickerRow({title: verbs[i]}));
}
var column3 = Ti.UI.createPickerColumn();
for (i = (names.length - 1); i >= 0; i--) {
    column3.addRow(Ti.UI.createPickerRow({title: names[i]}));
}
var picker = Ti.UI.createPicker({columns: [column1, column2, column3]});
_window.add(picker);
var btnRemove = Ti.UI.createButton({
    left: '5dp',
    height: '40dp',
    top: '100dp',
    title: 'reload'
});
btnRemove.addEventListener('click', function() {
    picker.reloadColumn(picker.columns[0]);
    console.log(picker.columns)
});
_window.add(btnRemove);
_window.open()

Steps to reproduce

Add the code above to an existing app.js

Click reload

Actual

two columns get removed

Expected

No columns removed

Comments

  1. Kota Iguchi 2017-09-14

    https://github.com/appcelerator/titanium_mobile_windows/pull/1110
  2. Kota Iguchi 2017-09-29

    6_3_X: https://github.com/appcelerator/titanium_mobile_windows/pull/1124
  3. Ewan Harris 2017-10-09

    Verified in 6.3.0.v20171006185117 and 7.0.0.v20171009065347

JSON Source