[TIMOB-25692] Windows: Pickers populated at run time do not fire change events
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-02-22T00:23:52.000+0000 |
Affected Version/s | Release 7.0.1 |
Fix Version/s | Release 7.1.0 |
Components | Windows |
Labels | n/a |
Reporter | Mostafizur Rahman |
Assignee | Kota Iguchi |
Created | 2018-01-22T20:14:21.000+0000 |
Updated | 2018-08-06T17:49:36.000+0000 |
Description
Hello,
When creating a picker on windows and populating it after the view has been opened the change event does not fire.
*Test Environment:*
Appcelerator Command-Line Interface, version 7.0.1
SDK: 7.0.1.GA
Operating System
Name = Microsoft Windows 10 Enterprise 2016 LTSB
Windows 10 emulator
*Test Code:*
<Alloy>
<Window id="win" class="container">
<Label id="label" onClick="createPicker">Create Picker</Label>
<Label id="label2" onClick="populatePicker">Populate Existing Picker</Label>
<Picker id="picker"/>
</Window>
</Alloy>
index.js
function populatePicker(e) {
var column = Ti.UI.createPickerColumn();
var pickerRow1 = Ti.UI.createPickerRow({
title: 'One'
});
var pickerRow2 = Ti.UI.createPickerRow({
title: 'Two'
});
column.addRow(pickerRow1);
column.addRow(pickerRow2);
$.picker.add([column]);
}
function createPicker(e) {
var picker = Ti.UI.createPicker({
top: 200,
width: Ti.UI.FILL,
height: 60,
backgroundColor: 'white'
});
$.win.add(picker);
var column = Ti.UI.createPickerColumn();
var pickerRow1 = Ti.UI.createPickerRow({
title: 'One'
});
var pickerRow2 = Ti.UI.createPickerRow({
title: 'Two'
});
column.addRow(pickerRow1);
column.addRow(pickerRow2);
picker.add([column]);
picker.addEventListener('change', function(){
alert('Created Picker Changed');
});
}
$.win.open();
$.picker.addEventListener('change', function(){
alert('Populated Picker Changed');
});
index.tss
".container": {
backgroundColor:"red"
}
"Label": {
width: Ti.UI.SIZE,
height: Ti.UI.SIZE,
color: "#000"
}
"#label": {
top: 100,
font: {
fontSize: 12
}
},
"#label2": {
top: 400,
font: {
fontSize: 12
}
},
"#picker":{
top: 500,
width: Ti.UI.FILL,
height: 60,
backgroundColor: 'white'
}
*Steps to Reproduce:*
- Open the sample app attached
- Click on the populate picker label
- Select an item from the picker
- Change event does not fire.
- Click on the create picker label
- Select an item from the new picker
- Change event fires
*Expected Result:*
When clicking on one of the newly added properties of the picker the change event should fire.
*Actual Result:*
The new property is selected but the change event does not fire.
https://github.com/appcelerator/titanium_mobile_windows/pull/1174
7_1_X: https://github.com/appcelerator/titanium_mobile_windows/pull/1196
[~kiguchi] Could you check the Jenkins build that was merged into master from 7_1_X, I am unable to view the changes in 7_1_X using a windows 10 device. (7.1.0.v20180228160738)
Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.