{ "id": "175939", "key": "TIMOB-28308", "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": "21177", "name": "Release 9.3.1", "archived": false, "released": true, "releaseDate": "2021-01-26" } ], "resolution": null, "resolutiondate": null, "created": "2021-01-04T20:53:04.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "ListView", "SearchBar", "android", "regression", "searchview" ], "versions": [ { "id": "21052", "description": "", "name": "Release 9.3.0", "archived": false, "released": true, "releaseDate": "2020-12-14" } ], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2021-01-21T18:18: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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "*Summary:*\r\nAs of Titanium 9.3.0, Android's {{ListView}} no longer fires a \"noresults\" event when the text you enter into the {{SearchBar}}/{{SearchView}} shows no results in the list.\r\nhttps://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ListView-event-noresults\r\n\r\n*Steps to reproduce:*\r\n# Build and run the below on Android.\r\n# Tap on the top search bar.\r\n# Enter \"x\" into the search.\r\n# Notice that {{\"@@@ noresults\"}} is not logged when it should.\r\n\r\n{code:javascript}\r\nfunction createListViewSectionItems() {\r\n\tvar items = [];\r\n\tfor (var index = 1; index <= 100; index++) {\r\n//\t\titems.push({ properties: { title: \"Row \" + index } });\r\n\t\titems.push({ properties: { title: \"Row \" + index, searchableText: \"Row \" + index } });\r\n//\t\titems.push({ properties: { title: \"Row \" + index, searchableText: \"Test \" + index } });\r\n\t}\r\n\treturn items;\r\n}\r\n\r\nvar window = Ti.UI.createWindow();\r\nvar listView = Ti.UI.createListView({\r\n\tsections: [Ti.UI.createListSection({\r\n\t\theaderTitle: \"ListView\",\r\n\t\titems: createListViewSectionItems(),\r\n\t})],\r\n\tsearchView: Ti.UI.createSearchBar({ showCancel: true }),\r\n//\tsearchView: Ti.UI.Android.createSearchView(),\r\n});\r\nlistView.addEventListener(\"noresults\", () => {\r\n\tTi.API.info(\"@@@ noresults\");\r\n});\r\nwindow.add(listView);\r\nwindow.open();\r\n{code}\r\n\r\n*Note:*\r\nThis is the code we lost since upgrading to RecyclerView in 9.3.0.\r\nhttps://github.com/appcelerator/titanium_mobile/blob/9_2_X/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiListView.java#L729-L744\r\n", "attachment": [], "flagged": false, "summary": "Android: ListView \"noresults\" event no longer fired as of 9.3.0", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "457984", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/12363", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-01-07T16:34:06.000+0000", "updated": "2021-01-07T16:34:06.000+0000" }, { "id": "458062", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed, Waiting on Jenkins build and backport. ", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-01-21T17:20:39.000+0000", "updated": "2021-01-21T17:20:39.000+0000" }, { "id": "458063", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "squash merged to master, backport PR to 9_3_X is merged for 9.3.1 target.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2021-01-21T17:39:19.000+0000", "updated": "2021-01-21T18:18:49.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }