{ "id": "143159", "key": "TIMOB-18411", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-01-05T08:59:26.000+0000", "created": "2015-01-19T19:12:10.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "ListView", "SearchBar", "qe-5.4.0" ], "versions": [ { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" } ], "issuelinks": [], "assignee": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "updated": "2016-06-15T19:00:56.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Programmatically setting a SearchBar's value doesn't filter the ListView's rows where it is attached to, unless you focus/blur it. The value does show.\r\n\r\nh1. Expected behaviour \r\n\r\nSetting the SearchBar value, either on creation or thereafter should filter the ListView (or TableView) it is attached to.\r\n\r\nh1. Steps to reproduce\r\n\r\n1. Build an app with the following code\r\n2. Confirm that both line 6 and 30 properly set the value but doesn't filter\r\n3. Confirm that line 29 en 31 provide a workaround\r\n\r\nh1. Code to reproduce\r\n\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'white'\r\n});\r\n\r\nvar searchView = Ti.UI.createSearchBar({\r\n value: 'Row 10'\r\n});\r\n\r\nvar listView = Ti.UI.createListView({\r\n top: 20,\r\n searchView: searchView,\r\n sections: [Ti.UI.createListSection({\r\n items: (function() {\r\n var items = [];\r\n for (var i = 1; i < 30; i++) {\r\n items.push({\r\n properties: {\r\n title: 'Row ' + i,\r\n searchableText: 'Row ' + i\r\n }\r\n });\r\n }\r\n return items;\r\n })()\r\n })]\r\n});\r\n\r\nwin.addEventListener('open', function() {\r\n // searchView.focus();\r\n searchView.value = 'Row 10';\r\n // searchView.blur();\r\n});\r\n\r\nwin.add(listView);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: A ListView's SearchBar doesn't filter when programmatically set", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "3.5.0.GA", "comment": { "comments": [ { "id": "372051", "author": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "body": "I just get an project where I really could need this. The workaround does what it should. But it's ot very nice", "updateAuthor": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-12-03T12:03:23.000+0000", "updated": "2015-12-03T12:16:45.000+0000" }, { "id": "373700", "author": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "body": "PR https://github.com/appcelerator/titanium_mobile/pull/7609", "updateAuthor": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-01-04T05:20:11.000+0000", "updated": "2016-01-04T05:20:11.000+0000" }, { "id": "373792", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR approved!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-01-05T08:59:17.000+0000", "updated": "2016-01-05T08:59:17.000+0000" }, { "id": "388404", "author": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed.\r\nTested on:
\r\niPhone 6s Plus (9.3.1)\r\niOS Simulator (9.3)\r\n
Mac OSX El Capitan 10.11.4\r\nStudio: 4.7.0.201606150733\r\n
Ti SDK: 5.4.0.v20160608165242\r\n
Appc NPM: 4.2.7-2\r\nAppc CLI: 5.4.0-15\r\n
Xcode 7.3.1\r\nNode v0.12.7\r\n*
Closing Ticket.*", "updateAuthor": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "created": "2016-06-15T19:00:09.000+0000", "updated": "2016-06-15T19:00:09.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }