Skip to content

Commit

Permalink
fix search-bar clear icon, see #1204
Browse files Browse the repository at this point in the history
  • Loading branch information
liqi07 committed Apr 26, 2017
1 parent 2584c80 commit 9fc76a7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/search-bar/index.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ export default class SearchBar extends React.Component<SearchBarProps, SearchBar
}

onChange = (e) => {
if (!this.state.focus) {
this.setState({
focus: true,
});
}
const value = e.target.value;
if (!('value' in this.props)) {
this.setState({ value });
Expand Down

0 comments on commit 9fc76a7

Please sign in to comment.