Skip to content

Commit

Permalink
fix: onClear for default searchbar (#1185)
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisJS authored and xavier-villelegier committed May 9, 2018
1 parent 4c1f3f9 commit 1a054bd
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/searchbar/SearchBar-default.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ const defaultSearchIcon = {
name: 'magnify',
color: colors.grey3,
};
const defaultClearIcon = {
type: 'material-community',
size: 18,
name: 'close',
color: colors.grey3,
};

class SearchBar extends Component {
focus = () => {
Expand Down Expand Up @@ -75,6 +69,13 @@ class SearchBar extends Component {
} = this.props;
const { isEmpty } = this.state;
const { style: loadingStyle, ...otherLoadingProps } = loadingProps;
const defaultClearIcon = {
type: 'material-community',
size: 18,
name: 'close',
color: colors.grey3,
onPress: this.clear
};
return (
<View
style={[
Expand Down

0 comments on commit 1a054bd

Please sign in to comment.