zamis 5 лет назад
Родитель
Сommit
ef27d57b3a
1 измененных файлов с 5 добавлено и 5 удалено
  1. 5 5
      src/client/js/components/SearchForm.jsx

+ 5 - 5
src/client/js/components/SearchForm.jsx

@@ -13,7 +13,7 @@ class SearchForm extends React.Component {
 
 
     this.state = {
     this.state = {
       searchError: null,
       searchError: null,
-      isCloseHelp: false,
+      isShownHelp: false,
     };
     };
 
 
     this.onSearchError = this.onSearchError.bind(this);
     this.onSearchError = this.onSearchError.bind(this);
@@ -45,7 +45,7 @@ class SearchForm extends React.Component {
 
 
   onBlur() {
   onBlur() {
     this.setState({
     this.setState({
-      isCloseHelp: true,
+      isShownHelp: false,
     });
     });
 
 
     this.getHelpElement();
     this.getHelpElement();
@@ -53,13 +53,13 @@ class SearchForm extends React.Component {
 
 
   onFocus() {
   onFocus() {
     this.setState({
     this.setState({
-      isCloseHelp: false,
+      isShownHelp: true,
     });
     });
   }
   }
 
 
   getHelpElement() {
   getHelpElement() {
     const { t, appContainer } = this.props;
     const { t, appContainer } = this.props;
-    const { isCloseHelp } = this.state;
+    const { isShownHelp } = this.state;
 
 
     const config = appContainer.getConfig();
     const config = appContainer.getConfig();
     const isReachable = config.isSearchServiceReachable;
     const isReachable = config.isSearchServiceReachable;
@@ -74,7 +74,7 @@ class SearchForm extends React.Component {
       );
       );
     }
     }
 
 
-    if (isCloseHelp) {
+    if (!isShownHelp) {
       return null;
       return null;
     }
     }