Reputation:
i don't know how to put searchbar into header
This is my code
render() {
return (
<View >
<Header
centerComponent={<SearchBar></SearchBar>}
/>
</View>
);
}
}
and looks like this
Upvotes: 1
Views: 1195
Reputation: 1462
I think the search bar is already inside the header component, but the search bar's size is bigger than the header height. You can check it with the inspect element in the browser. Try to increase the height of the header
You can improve the code like this
<Header centerComponent={<SearchBar/>} />
Upvotes: 1