diff --git a/.eslintrc b/.eslintrc index f160db502..337b34bc7 100644 --- a/.eslintrc +++ b/.eslintrc @@ -63,7 +63,7 @@ }], "react/void-dom-elements-no-children": ["warn"], "react/no-did-mount-set-state": ["warn", "disallow-in-func"], - "react/jsx-wrap-multilines": ["warn",{ + "react/jsx-wrap-multilines": ["error",{ "declaration": "parens", "assignment": "parens", "return": "parens", @@ -87,25 +87,25 @@ "react/jsx-no-comment-textnodes": ["warn"], "react/jsx-no-duplicate-props": ["warn"], "react/jsx-no-literals": ["warn"], - "react/jsx-no-undef": ["warn"], + "react/jsx-no-undef": ["error"], "react/jsx-one-expression-per-line": ["warn", {"allow": "single-child"}], "react/jsx-curly-brace-presence": ["warn", { "props": "always", "children": "ignore" }], "react/jsx-pascal-case": ["error"], - "react/jsx-props-no-multi-spaces": ["warn"], + "react/jsx-props-no-multi-spaces": ["error"], "react/jsx-sort-default-props": ["warn"], "react/jsx-sort-props": ["warn"], - "react/jsx-tag-spacing": ["warn", { + "react/jsx-tag-spacing": ["error", { "closingSlash": "never", "beforeSelfClosing": "always", "afterOpening": "allow-multiline", "beforeClosing": "allow" }], - "no-useless-escape": 2, + "no-useless-escape": ["error"], "no-invalid-this": 0, - "handle-callback-err": 2, - "no-fallthrough": 2, - "no-new-require": 2, - "max-len": [2, 160], + "handle-callback-err": ["error"], + "no-fallthrough": ["error"], + "no-new-require": ["error"], + "max-len": ["error", 160], "camelcase": 0, "require-jsdoc": 0, "valid-jsdoc": 0, diff --git a/src/webui/components/Search/index.js b/src/webui/components/Search/index.js index e2f0644b1..f8dc96fbf 100644 --- a/src/webui/components/Search/index.js +++ b/src/webui/components/Search/index.js @@ -133,6 +133,28 @@ class Search extends Component { } }; + render(): Node { + const { suggestions, search, loaded, loading, error } = this.state; + + return ( + + ); + } + /** * As user focuses out from input, we cancel all the request from requestList * and set the API state parameters to default boolean values. @@ -150,29 +172,11 @@ class Search extends Component { ); }; - render(): Node { - const { suggestions, search, loaded, loading, error } = this.state; - + renderAdorment() { return ( - - - - } - onSuggestionsFetch={this.handleFetchPackages} - onCleanSuggestions={this.handlePackagesClearRequested} - onClick={this.handleClickSearch} - onChange={this.handleSearch} - onBlur={this.onBlur} - /> + + + ); } }