Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24863] Windows: TableView.filterAttribute does not work

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-11-10T03:40:45.000+0000
Affected Version/sRelease 6.1.0, Release 6.1.1
Fix Version/sRelease 7.0.0
ComponentsWindows
Labelsn/a
ReporterEwan Harris
AssigneeKota Iguchi
Created2017-06-20T15:24:00.000+0000
Updated2017-11-16T02:26:03.000+0000

Description

When searching in a TableView, the results are not displayed correctly if the tableviewrow does not have a title but is just made up of child elements, all that is shown is grey empty rows
var win = Ti.UI.createWindow({
	backgroundColor: '#fff'
});
var tableData = [];
for (var i = 0, l = 100; i < l; i++) {
	var row = Ti.UI.createTableViewRow({
		_index: i
	});
	var titleLabel = Ti.UI.createLabel({
		text: i
	});
	row.add(titleLabel);
	tableData.push(row);
}
var tableSearch = Ti.UI.createSearchBar({
	hintText: 'Search'
});
var tableView = Ti.UI.createTableView({
	data: tableData,
	filterAttribute: '_index',
	search: tableSearch,
});
win.add(tableView);
win.open()

Steps to reproduce

Add the above code to an existing app.js

Build for Windows

Search for something, (the search values will be numbers)

Actual

Empty grey rows are shown in the search dropdown

Expected

If possible the search dropdown rows should reflect the tableview rows, similar to iOS

Comments

  1. Kota Iguchi 2017-10-24

    I think this is because filterAttribute property is not implemented on Windows. I have changed the ticket title.
  2. Kota Iguchi 2017-10-24

    https://github.com/appcelerator/titanium_mobile_windows/pull/1151
  3. Abir Mukherjee 2017-11-16

    Changes are seen in 7.0.0.v20171115153702.

JSON Source