From 09364fafe50ae7c8ec263a56f116ee12aefce06c Mon Sep 17 00:00:00 2001 From: rudouglas Date: Wed, 9 Jun 2021 16:15:57 +0100 Subject: [PATCH] fix: Search onClear functionality `X` button now appears when there's a value in input, and clicking it clears the value --- src/pages/observability-packs.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/observability-packs.js b/src/pages/observability-packs.js index c5fa4b40b..94201177e 100644 --- a/src/pages/observability-packs.js +++ b/src/pages/observability-packs.js @@ -111,7 +111,8 @@ const ObservabilityPacksPage = ({ data, location }) => { css={css` margin: 15px 0; `} - onClear={() => null} + value={searchTerm} + onClear={() => setSearchTerm('')} placeholder="Search for an observability pack" onChange={(e) => { setSearchTerm(e.target.value.toLowerCase());