From 9da986e626d81ee2021aba850246533a42ab1c6d Mon Sep 17 00:00:00 2001 From: Biplav Kumar Mazumdar <68702055+biplavmz@users.noreply.github.com> Date: Wed, 16 Aug 2023 23:21:51 +0530 Subject: [PATCH] docs(website): Add a "clearAll" button to site showcase (#9233) --- .../_components/ShowcaseFilterToggle/index.tsx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/website/src/pages/showcase/_components/ShowcaseFilterToggle/index.tsx b/website/src/pages/showcase/_components/ShowcaseFilterToggle/index.tsx index aaada5d7618f..78c1126c61a6 100644 --- a/website/src/pages/showcase/_components/ShowcaseFilterToggle/index.tsx +++ b/website/src/pages/showcase/_components/ShowcaseFilterToggle/index.tsx @@ -44,8 +44,16 @@ export default function ShowcaseFilterToggle(): JSX.Element { }); }, [operator, location, history]); + const ClearTag = () => { + history.push({ + ...location, + search: '', + state: prepareUserState(), + }); + }; + return ( -