[TIMOB-23641] Windows: list section instertItemsAt not working
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-07-18T02:29:42.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 6.0.0 |
Components | Windows |
Labels | n/a |
Reporter | Zakhar Zhuravlev |
Assignee | Gary Mathews |
Created | 2016-06-29T17:40:34.000+0000 |
Updated | 2016-08-22T16:14:28.000+0000 |
Description
I want to add row to the top pf the list (0 index of row), but instead of this section adding row to the end.
index.xml:
<Alloy>
<Window id='win' backgroundColor="green">
<ListView id="list" defaultItemTemplate="t">
<Templates>
<ItemTemplate name="t" >
<Label bindId="label" />
</ItemTemplate>
</Templates>
<ListSection id="section">
</ListSection>
</ListView>
<Button backgroundColor='red' width='100dp' height='44dp' onClick='doClick' />
</Window>
</Alloy>
index.js:
function doClick(e) {
$.section.insertItemsAt(0, [{label: {text: 'test4'}}]);
}
$.section.appendItems([
{label: {text: 'test1'}},
{label: {text: 'test2'}},
{label: {text: 'test3'}},
]);
$.win.open();
master: https://github.com/appcelerator/titanium_mobile_windows/pull/780
by the way, it's not working for scrollview as well.
Verified using: Windows 10 Pro Appc core: 6.0.0-26 Appc NPM: 4.2.8-5 Ti SDK: 6.0.0.v20160822001523 Lumia 930: 10.0 Luma 520: 8.1 List section insertItemsAt now functions correctly Closing ticket