Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25246] Windows: PickerColumn shrinks after reload

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-09-25T11:54:46.000+0000
Affected Version/sRelease 7.0.0, Release 6.2.0
Fix Version/sRelease 6.3.0
ComponentsWindows
Labelsregression
ReporterEwan Harris
AssigneeKota Iguchi
Created2017-09-07T13:47:04.000+0000
Updated2017-10-09T15:11:02.000+0000

Description

Description

*This is a regression but I call it that lightly as in 6.1.2.GA the columns would already start small* When calling reloadColumn the size of the column shrinks in width with each call
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

1. Add the code above to an existing app.js 2. Click reload multiple times

Actual

Column shrinks in width

Expected

Column width should stay constant

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