From 66b4d9a86fd4fb6cc61209e870fd00d8098cf2e9 Mon Sep 17 00:00:00 2001 From: Sudhanshu Gautam Date: Wed, 3 Jul 2019 16:32:59 +0530 Subject: [PATCH] fixes toggle search result and remove gfont dependency Previously, the search resutls were displayed only when the search input was in focus and were hidden when it went out of focus. In order to make the options in the list work, the focus out event was delayed by 300ms. Now, to get rid of the delay, an onClick event is added to the outer- most container of the component which checks if the clicked element (target of the event) is an descendant of the 'search-container' class housing the search input. If it is an descendant and the search query is not empty, then the result list is displayed otherwise it is hidden. Signed-off-by: Sudhanshu Gautam --- public/index.html | 1 - src/containers/home/home.js | 60 +++++++++++++++++++++---------------- 2 files changed, 35 insertions(+), 26 deletions(-) diff --git a/public/index.html b/public/index.html index b6977ca..46b6241 100644 --- a/public/index.html +++ b/public/index.html @@ -11,7 +11,6 @@ user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ --> -