From 51cde1b51ec236aacf13615bece4b33c024b6f8c Mon Sep 17 00:00:00 2001 From: Anton Harniakou Date: Thu, 7 Jun 2018 21:04:08 +0300 Subject: [PATCH] Use React Refs instead of DOM queries --- src/components/Navigation/Navigation.jsx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/components/Navigation/Navigation.jsx b/src/components/Navigation/Navigation.jsx index e9b2862c91f6..765a0629baf6 100644 --- a/src/components/Navigation/Navigation.jsx +++ b/src/components/Navigation/Navigation.jsx @@ -11,7 +11,7 @@ export default class Navigation extends React.Component { let { pageUrl = '' } = this.props; return ( -
+
this.container = container }>
@@ -42,6 +42,7 @@ export default class Navigation extends React.Component { type="text" className="navigation__search-input" placeholder="Search documentation…" + ref={ searchInput => this.searchInput = searchInput } onBlur={ this._toggleSearch.bind(this) } />