Skip to content

Commit 6a4bb7d

Browse files
committed
fix: fix searchbar
1 parent 2017024 commit 6a4bb7d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

example/src/SearchBarExample.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ export default class SearchExample extends Component {
1010
query: '',
1111
};
1212

13-
_onChangeSearch = query => this.setState({ query });
13+
_handleChangeSearch = query => this.setState({ query });
1414

1515
render() {
1616
return (
1717
<SearchBar
1818
placeholder="Search"
19-
onChangeText={this._onChangeSearch}
19+
onChangeText={this._handleChangeSearch}
2020
value={this.state.query}
2121
/>
2222
);

src/components/SearchBar.js

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ class SearchBar extends Component<void, Props, void> {
6767
placeholderTextColor={colors.placeholder}
6868
underlineColorAndroid="transparent"
6969
returnKeyType="search"
70+
value={value}
7071
{...rest}
7172
/>
7273
{value

0 commit comments

Comments
 (0)