[TIMOB-24019] Windows: Listitems do not maintain itemindex when filtered
GitHub Issue | n/a |
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-10-18T17:27:12.000+0000 |
Affected Version/s | Release 6.0.0 |
Fix Version/s | Release 6.0.0 |
Components | Windows |
Labels | n/a |
Reporter | Ricardo Ramirez |
Assignee | Kota Iguchi |
Created | 2016-10-11T22:45:40.000+0000 |
Updated | 2016-10-21T22:36:09.000+0000 |
Description
Issue Description
Listitems do not maintain item index on search filter
Steps to reproduce
Download and run the project
Search by number 0-11 (the list should filter down to just that number)
Click on the list item with the number (alert with itemindex should pop up)
Expected: the itemindex matches the item's position in the list
Actual: the itemindex is 0 because the list has been filtered down to one item.
Attachments
[~rramirez] is APPTS the correct project for this ticket?
ok confirmed that this is a bug, started work on it. We needed to keep "original" data and indexes. What I also noticed is that
ListView.sections
does not keep the original data, which is a bug too. But one good thing here is that you can actually get the clicked data content by gettingListView.sections\[e.sectionIndex\].items\[e.itemIndex\]
because of that. [~rramirez] Do you think you can workaround it by accessingsections
andsection.items
directly like below?https://github.com/appcelerator/titanium_mobile_windows/pull/881
This should be on 6_0_X now. Check out
6.0.0.v20161021034759
.Verified using: OS: Microsoft Windows 10 Pro 10.0.14393 Appc core: 6.0.0-63 Appc NPM: 4.2.8-9 Ti SDK: 6.0.0.v20161021034759 Lumia 550 10.0 e.itemIndex now corresponds to the values in the original listview and not the filtered listview. Provided test case now works as expected Closing ticket