{ "id": "123732", "key": "TIMOB-15995", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "16092", "description": "2014 Sprint 08", "name": "2014 Sprint 08", "archived": true, "released": true, "releaseDate": "2014-04-24" }, { "id": "16093", "description": "2014 Sprint 08 SDK", "name": "2014 Sprint 08 SDK", "archived": true, "released": true, "releaseDate": "2014-04-24" }, { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-04-15T16:57:59.000+0000", "created": "2013-12-13T20:07:05.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "feature", "ios", "module_tableview", "qe-testadded" ], "versions": [], "issuelinks": [], "assignee": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-04-28T07:29:23.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": [ { "id": "10202", "name": "Android", "description": "Android Platform" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Add a property to support the option to apply the NSAnchoredSearch flag to the search options in the Titanium.UI.TableView\r\n\r\nSee [NSAnchoredSearch|https://developer.apple.com/library/ios/documentation/cocoa/Reference/Foundation/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html#//apple_ref/c/econst/NSAnchoredSearch] for more details.\r\n\r\nI will supply the necessary changes via Pull Request as soon as possible", "attachment": [], "flagged": false, "summary": "Add support for NSAnchoredSearch in Titanium.UI.TableView search options", "creator": { "name": "nichines", "key": "nichines", "displayName": "Nic Hines", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "nichines", "key": "nichines", "displayName": "Nic Hines", "active": true, "timeZone": "Europe/London" }, "environment": "iOS", "comment": { "comments": [ { "id": "284371", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks for filing this enhancement request. You can submit the pull request, if available, to speed up this request. I am moving this request to engineering for further evaluation. Here is some information on how NSAnchoredSearch is used to limit the search to start or end.\n\nhttps://developer.apple.com/library/ios/documentation/cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html#//apple_ref/c/econst/NSAnchoredSearch\nhttp://samplecodebank.blogspot.com/2013/05/nsstring-nsanchoredsearch-example-ios.html\n", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-15T19:39:28.000+0000", "updated": "2013-12-15T19:39:28.000+0000" }, { "id": "285425", "author": { "name": "nichines", "key": "nichines", "displayName": "Nic Hines", "active": true, "timeZone": "Europe/London" }, "body": "I have submitted the pull request. I have implemented it for both iOS and Android.\r\n\r\n{code:JavaScript}\r\n/*\r\n * app.js - Anchored Search Test/Demo\r\n */\r\n//bootstrap and check dependencies\r\nif (Ti.version < 1.8 ) {\r\n alert('Sorry - this application template requires Titanium Mobile SDK 1.8 or later');\r\n}\r\n\r\n// This is a single context application with multiple windows in a stack\r\n(function() {\r\n\r\n var win = Titanium.UI.createWindow({\r\n title:'Anchored Search Test',\r\n backgroundColor:'white'\r\n });\r\n\r\n // create table view data object\r\n var data = [];\r\n\r\n data[0] = Ti.UI.createTableViewRow({title:'1. Row 1'});\r\n data[1] = Ti.UI.createTableViewRow({title:'2. Row 2'});\r\n data[2] = Ti.UI.createTableViewRow({title:'2a. Row 2a'});\r\n data[3] = Ti.UI.createTableViewRow({title:'3. (not 2a)'});\r\n data[4] = Ti.UI.createTableViewRow({title:'3a. Row 3a'});\r\n\r\n var search = Titanium.UI.createSearchBar({\r\n barColor:'#385292',\r\n hintText:'search'\r\n });\r\n\r\n search.addEventListener('change', function(e) {\r\n e.value; // search string as user types\r\n });\r\n search.addEventListener('return', function(e) {\r\n search.blur();\r\n });\r\n\r\n // create table view\r\n var tableview = Titanium.UI.createTableView({\r\n data:data,\r\n search:search\r\n });\r\n\r\n var toggleSwitchLabel = Titanium.UI.createLabel({\r\n text:'Enable Anchored Search' ,\r\n left:10\r\n });\r\n\r\n var toggleSwitch = Titanium.UI.createSwitch({\r\n value:false,\r\n color:'#999',\r\n right:10\r\n });\r\n\r\n var osname = Ti.Platform.osname;\r\n\r\n if (osname === 'iphone' || osname === 'ipad') {\r\n tableview.top = 55;\r\n toggleSwitchLabel.top = 25;\r\n toggleSwitch.top = 20;\r\n }\r\n else {\r\n tableview.top = 50;\r\n toggleSwitchLabel.top = 10;\r\n toggleSwitch.top = 0;\r\n }\r\n\r\n toggleSwitch.addEventListener('change',function(e) {\r\n tableview.filterAnchored = e.value;\r\n });\r\n\r\n win.add(toggleSwitchLabel);\r\n win.add(toggleSwitch);\r\n win.add(tableview);\r\n\r\n win.open();\r\n})();\r\n{code}", "updateAuthor": { "name": "nichines", "key": "nichines", "displayName": "Nic Hines", "active": true, "timeZone": "Europe/London" }, "created": "2013-12-20T20:58:24.000+0000", "updated": "2013-12-20T20:58:24.000+0000" }, { "id": "300715", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Link to PR: https://github.com/appcelerator/titanium_mobile/pull/5157", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-04-11T20:42:37.000+0000", "updated": "2014-04-11T20:42:37.000+0000" }, { "id": "302671", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Anchored Search works fine on tableview search\r\nVerified on:\r\nAppc Studio: 3.3.0.201404211130 \r\nSDK build: 3.3.0.v20140422163054\r\nalloy: 1.4.0-dev \r\nCLI: titanium-3.3.0-dev \r\ntitanium-code-processor:1.1.1-beta1 \r\nXcode: 5.1.1 \r\nOsx: 10.9.2\r\nDevice: Nexus 5 (4.4.2), iPhone4 (7.1)", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-28T07:29:23.000+0000", "updated": "2014-04-28T07:29:23.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }