Skip to content

Commit

Permalink
fix: Search onClear functionality
Browse files Browse the repository at this point in the history
`X` button now appears when there's a value in input, and clicking it clears the value
  • Loading branch information
rudouglas committed Jun 9, 2021
1 parent 8a05f6f commit 09364fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/observability-packs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 09364fa

Please sign in to comment.