|
@@ -48,14 +48,15 @@ class SearchBox extends React.Component {
|
|
|
handleInput(e){
|
|
|
e.stopPropagation();
|
|
|
e.preventDefault();
|
|
|
- const { getSearchData ,mainIds} = this.props;
|
|
|
+ const { getSearchData ,mainIds,clearSearch} = this.props;
|
|
|
clearTimeout(this.state.timer);
|
|
|
let timer = setTimeout(()=>{
|
|
|
clearTimeout(this.state.timer);
|
|
|
if(e.target.value.trim() == ''){
|
|
|
this.setState({
|
|
|
showClear:false
|
|
|
- })
|
|
|
+ });
|
|
|
+ clearSearch();
|
|
|
return
|
|
|
}
|
|
|
this.setState({
|