{ "id": "114283", "key": "AC-2187", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2013-07-15T18:08:57.000+0000", "created": "2013-05-13T12:00:42.000+0000", "labels": [ "index", "ios", "tableview" ], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:41:10.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "If I have table view with index (Index contain whole alphabet) ,but in the table view I've got only values with \"A\", \"B\", \"C\", \"D\" (In all 300 - for example). When I click on the letter A/B/C/D there isn't no problem, I can see values which start with letter... But when I click for example to letter \"E\" or higher (Values where isn't set index in index array) then TableView automatically scroll to top on first letter \"A\". This is a big problem when I have values A->E then for example F/G is empty and rest is also set. When somebody click on the letter \"F\" tableview show letter \"A\". It has to stay on the last letter no scroll to first...\r\n\r\nI know that I can solve this \"somehow\" ,but that is annoying. Much better is fixed the \"main\" bug than every time solve... Thanks you so much\r\n\r\n* app.js (From KitchenSink)*\r\n{code:javascript}\r\nvar win = Titanium.UI.createWindow();\r\n\r\nvar data = [\r\n\t{title:'Alan (click to change index)', hasChild:true, header:'A'},\r\n\t{title:'Alice', hasDetail:true},\r\n\t{title:'Alexander'},\r\n\t{title:'Amos'},\r\n\t{title:'Alonzo'},\r\n\t{title:'Brad', header:'B'},\r\n\t{title:'Brent'},\r\n\t{title:'Billy'},\r\n\t{title:'Brenda'},\r\n\t{title:'Callie', header:'C'},\r\n\t{title:'Cassie'},\r\n\t{title:'Chris'},\r\n\t{title:'Cameron'},\r\n\t{title:'Don', header:'D'},\r\n\t{title:'Dilbert'},\r\n\t{title:'Deacon'},\r\n\t{title:'Devin'},\r\n\t{title:'Darin'},\r\n\t{title:'Darcy'},\r\n\t{title:'Erin', header:'E'},\r\n\t{title:'Erica'},\r\n\t{title:'Elvin'},\r\n\t{title:'Edrick'},\r\n\t{title:'Frank', header:'F'},\r\n\t{title:'Fred'},\r\n\t{title:'Fran'},\r\n\t{title:'Felicity'},\r\n\t{title:'George', header:'G'},\r\n\t{title:'Gina'},\r\n\t{title:'Gary'},\r\n\t{title:'Herbert', header:'H'},\r\n\t{title:'Henry'},\r\n\t{title:'Harold'},\r\n\t{title:'Ignatius', header:'I'},\r\n\t{title:'Irving'},\r\n\t{title:'Ivan'},\r\n\t{title:'Dr. J', header:'J'},\r\n\t{title:'Jefferson'},\r\n\t{title:'Jenkins'},\r\n\t{title:'Judy'},\r\n\t{title:'Julie'},\r\n\t{title:'Kristy', header:'K'},\r\n\t{title:'Krusty the Clown'},\r\n\t{title:'Klaus'},\r\n\t{title:'Larry', header:'L'},\r\n\t{title:'Leon'},\r\n\t{title:'Lucy'},\r\n\t{title:'Ludwig'},\r\n\t{title:'Mary', header:'M'},\r\n\t{title:'Mervin'},\r\n\t{title:'Malcom'},\r\n\t{title:'Mellon'},\r\n\t{title:'Ned', header:'N'},\r\n\t{title:'Nervous Eddie'},\r\n\t{title:'Nelson'},\r\n\t{title:'The Big O', header:'O'},\r\n\t{title:'Orlando'},\r\n\t{title:'Ox'},\r\n\t{title:'Pluto', header:'P'},\r\n\t{title:'Paris'},\r\n\t{title:'Potsie'}\r\n];\r\n\r\nvar tableview = Titanium.UI.createTableView({ data:data });\r\n\r\nvar index = [\r\n\t{title:'A',index:0},\r\n\t{title:'B',index:5},\r\n\t{title:'C',index:9},\r\n\t{title:'D',index:13},\r\n\t{title:'E',index:19},\r\n\t{title:'F',index:23},\r\n\t{title:'G',index:27},\r\n\t{title:'H'},\r\n\t{title:'I',index:33},\r\n\t{title:'J',index:36},\r\n\t{title:'K',index:41},\r\n\t{title:'L',index:44},\r\n\t{title:'M',index:48},\r\n\t{title:'N',index:52},\r\n\t{title:'O',index:55},\r\n\t{title:'P',index:(data.length -1)}\r\n];\r\n\r\ntableview.index = index;\r\nwin.add(tableview);\r\nwin.open();\r\n{code}\r\n\r\n(Click on \"A\" and slow slide down to \"P\". If you will be on the letter \"H\" where isn't set any index param you will see first letter (\"A\"). That is the bug. If there isn't any index table can't show first letter. It must stay on last index/letter...)", "attachment": [], "flagged": false, "summary": "iOS: TableView index without index attribute", "creator": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Macbook Pro, OSX 10.7.5, iOS Simulator v. 6.0 (369.2). Ti: 3.1 GA", "comment": { "comments": [ { "id": "251578", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Matej,\r\n\r\nPlease provide a simple reproducible test case that we can drop into an app.js and run.\r\n\r\nThanks!", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-13T18:29:31.000+0000", "updated": "2013-05-13T18:29:31.000+0000" }, { "id": "252169", "author": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Done ;)", "updateAuthor": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-15T21:01:32.000+0000", "updated": "2013-05-15T21:01:32.000+0000" }, { "id": "258111", "author": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Please can you edit \"Needs more info\". I already added info... Thanks", "updateAuthor": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-16T20:37:43.000+0000", "updated": "2013-06-16T20:37:43.000+0000" }, { "id": "260088", "author": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "body": "???", "updateAuthor": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-28T21:36:04.000+0000", "updated": "2013-06-28T21:36:04.000+0000" }, { "id": "261829", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Matej,\r\n\r\nI can't reproduce this on iOS 6 simulator with Ti SDK 3.1 GA or 3.2 CI. Clicking E scrolls to E values, F scrolls to F values etc.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-15T18:08:57.000+0000", "updated": "2013-07-15T18:08:57.000+0000" }, { "id": "261838", "author": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi, what about H?", "updateAuthor": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-15T18:37:00.000+0000", "updated": "2013-07-15T18:37:00.000+0000" }, { "id": "261840", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Oh I see, the description needs changing...", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-15T18:41:57.000+0000", "updated": "2013-07-15T18:41:57.000+0000" }, { "id": "261841", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Didn't see the part below the test case, my apologies.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-15T18:42:54.000+0000", "updated": "2013-07-15T18:42:54.000+0000" }, { "id": "261845", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "So basically you're saying that if no index attribute is set, then clicking on the index shouldn't scroll to the top, it should just stay put and do nothing?\r\n\r\nBy default the index is 0, so in that respect it makes sense.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-15T18:47:24.000+0000", "updated": "2013-07-15T18:59:13.000+0000" }, { "id": "261849", "author": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Exactly. For example application Contacts (Alphabetical list...) that you can find in an iPhone is working like this. It is much better than...", "updateAuthor": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-15T19:02:28.000+0000", "updated": "2013-07-15T19:02:28.000+0000" }, { "id": "261850", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yes, you're right. I'll clean up the issue and move to Ti Mob.\n\nTested and confirmed on iOS 6 simulator with Ti SDK 3.1.1 GA and 3.2 CI.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-15T19:11:56.000+0000", "updated": "2013-07-15T19:11:56.000+0000" }, { "id": "261853", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Actually, the behavior I saw in the contacts app was that it scrolled to the nearest index with content when tapping an index with no content. The behavior in Titanium is exactly the same.\n\nThe fact is that if you don't set an index attribute, the index attribute is 0 by default.\n\nIn the contacts app I guess they do set the index attribute for all alphabet values.\n\nSo my question is why do you need to omit the index attribute for some indexes?", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-15T19:23:53.000+0000", "updated": "2013-07-15T19:23:53.000+0000" }, { "id": "262082", "author": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "body": "OK so when I want to have in my application same behavior like in contacts app I have to set every index. Isn't it easier to make it automatically by Titanium?", "updateAuthor": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-16T19:18:29.000+0000", "updated": "2013-07-16T19:18:53.000+0000" }, { "id": "262180", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Correct. Well I suppose Titanium could set the index to be the array position, but I don't see much of a need to make this change (there are only 26 letters in the alphabet you need to set it for), and it may break apps which rely on being able to set the index manually.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-17T17:56:41.000+0000", "updated": "2013-07-17T17:56:41.000+0000" } ], "maxResults": 15, "total": 15, "startAt": 0 } } }