Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS: SearchBar in NavigationWindow not visible on creation #13388

Open
1 task done
caspahouzer opened this issue Apr 12, 2022 · 3 comments
Open
1 task done

iOS: SearchBar in NavigationWindow not visible on creation #13388

caspahouzer opened this issue Apr 12, 2022 · 3 comments
Labels
bug ios needs triage This issue hasn't been reviewed by maintainers

Comments

@caspahouzer
Copy link
Contributor

I have searched and made sure there are no existing issues for the issue I am filing

  • I have searched the existing issues

Description

The SearchBar of a TableView with showSearchBarInNavBar: true, is not visible until a scroll was fired

Expected Behavior

The SearchBar should be visible on creation

Actual behavior

The SearchBar is not visible on creation

Bildschirmaufnahme.2022-04-12.um.07.32.36.mov

Reproducible sample

var win = Ti.UI.createWindow({title: 'Appcelerator Titanium'});

var navigagtionWindow = Ti.UI.createNavigationWindow({
    window: win
});

var search = Titanium.UI.createSearchBar({
    height: 43
});

Ti.UI.backgroundColor = 'white';

var sectionFruit = Ti.UI.createTableViewSection({headerTitle: 'Fruit'});
sectionFruit.add(Ti.UI.createTableViewRow({title: 'Apples'}));
sectionFruit.add(Ti.UI.createTableViewRow({title: 'Bananas'}));
sectionFruit.add(Ti.UI.createTableViewRow({title: 'Mangos'}));
sectionFruit.add(Ti.UI.createTableViewRow({title: 'Ananas'}));
sectionFruit.add(Ti.UI.createTableViewRow({title: 'Peaches'}));

var sectionVeg = Ti.UI.createTableViewSection({headerTitle: 'Vegetables'});
sectionVeg.add(Ti.UI.createTableViewRow({title: 'Carrots'}));
sectionVeg.add(Ti.UI.createTableViewRow({title: 'Potatoes'}));

var sectionFish = Ti.UI.createTableViewSection({headerTitle: 'Fish'});
sectionFish.add(Ti.UI.createTableViewRow({title: 'Cod'}));
sectionFish.add(Ti.UI.createTableViewRow({title: 'Haddock'}));

var table = Ti.UI.createTableView({
    id: 'tableView',
    search: search,
    dimBackgroundForSearch: true,
    showSearchBarInNavBar: true,
    data: [sectionFruit, sectionVeg, sectionFish]
});

win.add(table);
navigagtionWindow.open();

Steps to reproduce

Execute the example

Platform

iOS

SDK version you are using

10.1.1.GA

Alloy version you are using

none

@hansemannn
Copy link
Collaborator

That actually native behavior. I think there is a property to show it from the beginning, but this is the usual way right now.

@caspahouzer
Copy link
Contributor Author

That's strange. If I put that in a TabGroup, the Searchbar is already visible. But that's also an Alloy project. Could that be related?

Bildschirmaufnahme.2022-04-12.um.08.41.35.mov

@hansemannn
Copy link
Collaborator

Interesting. Tab groups handle windows differently internally (it's actually a view controller inside a navigation controller inside a tab bar controller). I really have to check that in more detail. On my list!

@m1ga m1ga added the ios label Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ios needs triage This issue hasn't been reviewed by maintainers
Projects
None yet
Development

No branches or pull requests

3 participants