Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19167] ios: t of tTableView SearchBar is not rendered when the display area is out of the display range

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 4.1.1
Fix Version/sn/a
ComponentsiOS
Labels3.4.0, 3.4.1, TCSupportTriage, engTriage, iOS8, searchbar, tableview
ReporterMarkus Eschenbach
AssigneeUnknown
Created2014-11-11T11:19:58.000+0000
Updated2019-12-16T18:28:25.000+0000

Description

Problem description

The searchbar for the tableview is not rendered when the display area for the searchbar is out of the display range.

Steps to reproduce

1. Tap the nav button "search" to show the searchbar of the tableview 2. Tap the nav button again to hide the searchbar 3. Scroll down to the last entry of the tableview 4. Tap the nav button "search" Result: The searchbar is not rendered. There is only a white area on the top of the tableview. Hint: Tap on the white area and the search will appear

Test case

(function() {
	Ti.UI.backgroundColor = 'white';
	
	var win = Ti.UI.createWindow();
	var navWin = Titanium.UI.iOS.createNavigationWindow({window: win});
	var rightNavBtn = Ti.UI.createButton({title: L('search')});
	var tableData = [];
	var tableView;
	var searchBar = Titanium.UI.createSearchBar();
	
	for (var i=0; i < 50; i++) {
	  tableData.push({title: 'Entry ' + i});
	}
	
	tableView = Ti.UI.createTableView({data: tableData});

    rightNavBtn.addEventListener('click', function(){
    	if(tableView.getSearch()){
    		tableView.setSearch(null);
    	}else{
           tableView.setSearch(searchBar); 
           tableView.scrollToTop(0);
    	}
    });	
    
    win.rightNavButton = rightNavBtn;
    
	win.add(tableView);
	navWin.open();
})();	

Comments

No comments

JSON Source