Преглед на файлове

主诉添加症状bug修改2412

zhouna преди 5 години
родител
ревизия
c89c468d12
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3 2
      src/common/components/SearchBox/index.jsx

+ 3 - 2
src/common/components/SearchBox/index.jsx

@@ -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({