Skip to content

Commit

Permalink
fix search-bar clear icon, see ant-design#1204
Browse files Browse the repository at this point in the history
  • Loading branch information
liqi07 authored and lixiaoyang1992 committed Apr 26, 2018
1 parent 64faa8f commit 6d12db4
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 6d12db4

Please sign in to comment.